The Fleetwood Mac legend and the US band recorded the collaboration in 1981 and performed it midway through their headlining set at London's Hyde Park for the first time in more than 18 years.
Petty, 66, introduced Nicks as an ''honourary'' member of the group as she walked onto The Great Oak stage.
Paying tribute to his bandmates on the band's 40th anniversary, the 'I Won't Back Down' hitmaker told the sun-kissed crowd: ''It's great to be here. It's has been far too long, and this beautiful London summer is amazing.
''We are celebrating our 40th year together ... these people [his bandmates] have been in my life a long time and somehow we are still together. We are probably closer than family.''
Petty and the Heartbreakers pulled out all of their biggest hits including 'Free Fallin' and 'Learning To Fly'.
Earlier in the day, Nicks played her own set opening with her song 'Gold and Braid' before closing with Fleetwood's 1975 classic 'Landslide'.
The set featured many songs from the iconic 70s group; 'Gypsy', 'Dreams', 'Gold Dust Woman' and 'Rhiannon'.
The 69-year-old star also performed her hit with her bandmate Lindsey Buckingham, 'Crying in the Night', from 1973.
Before singing the number, Nicks recalled how the track meant she ''didn't have to be a waitress anymore''.
She then reminded festival-goers to keep dreaming as ''dreams do come true''.
She continued: ''And 44 years later ... so if you ever fear that dreams don't come true, they do.''
Nicks said that her BST show will be one ''heartfelt'' memory she will never forget.
She said: ''This is one big, heartfelt memory that I, Stevie, will take with me forever.''
Feet are mid-tour and promoting their debut album, and tonight they played Ramsgate Music Hall with support from local band Malpractice.
Famed for performing one of her own songs as her opening gambit on The X Factor, Lucy Spraggan rocked up at the Booking Hall as part of her UK and...
After nearly thirty years since his first solo record Mark Lanegan has just released one of his very best and there's not many artists who can claim...
Listen to their new single 'People Change'.
For the first, and almost certainly last, time Cambridge indie rockers Mallory Knox performed at The Booking Hall in Dover.
'Devour You' is a fantastic follow up to Starcrawler's debut album and represents a move on in terms of sound and, in part, direction.
Salvation Jayne's third birthday bash was a riot of colour and a celebration of a band very much enjoying what they do.
We're feeling the nostalgia this month.