Kasabian, Swedish House Mafia close T in the Park 2012
Kasabian have headlined the final day at T In The Park, bringing Scotland's biggest festival to a close.
The group, fronted by Tom Meighan, filled their set at Balado Park with hits including Underdog and Fire.
Over at the Radio 1/NME stage, Swedish House Mafia performed one of their last ever UK gigs.
The trio, made up of DJs Steve Angello, Axwell and Sebastian Ingrosso, announced they were splitting up two weeks ago.
Sunday remained largely dry although the heavy rain on Saturday had left much of the site with mudbath conditions.
Other acts on Sunday included Maverick Sabre, Elbow and Nicki Minaj.
US rapper Minaj had her set cut short after arriving on stage around 50 minutes late.
Earlier in the day she'd tweeted: "Still sick but the show must go on...right? #scotland."
T in the Park debut
McFly made their T in the Park debut on the main stage on Sunday afternoon.
Their set included Star Girl, All About You and their first number one single, Five Colours In Her Hair.
"It's hard going on first, especially at a festival," said singer Tom Fletcher.
"We felt quite confident though. People got up early and braved their hangovers to come and see us."
"We enjoyed ourselves," said drummer Harry Judd. "We'd love to come back."
After a sunny start to the festival, heavy rain hit the site early on Saturday morning.
By Sunday, large areas of the arena were coated with thick mud puddles.
Seventeen-year-old friends Amy Struthers and Nicole Robinson from Glasgow remained fairly clean after paying extra for shower facilities at the festival.
Amy said: "It's been madness. There's a guy walking around head to toe in muck after mud sliding. He looked like he had a good time."
During Sunday, Chase and Status, Rita Ora, The Wanted and Bombay Bicycle Club also performed for the crowd.
Glaswegians Twin Atlantic made their debut on the main stage, four years after their first T in The Park appearance.
"We're quite biased and are very patriotic," said drummer Craig Kneale. "Scottish gigs are very special to us."
The festival is now in its 19th year.
Snow Patrol, The Stone Roses and David Guetta all headlined over the course of the weekend.