Jay Z and Kendrick Lamar join Beyonce onstage at end of her Formation world tour

Beyonce finished her Formation world tour with onstage appearances from husband Jay Z, rapper Kendrick Lamar and US tennis player Serena Williams.

Wolverine actor Hugh Jackman and Frank Ocean were among 80,000 people in the crowd at New Jersey's MetLife Stadium.

Beyonce sang tracks from her six solo albums, including her latest effort, Lemonade.

Jay Z joined his wife for Drunk In Love, making his first appearance on the tour, which started in April.

Kendrick Lamar's cameo included a dance-off with Beyonce in a pool of water during Freedom.

Meanwhile Serena Williams - who appears in the music video for Sorry - brought the clip to life by twerking while Beyonce sang the song.

Beyonce was supposed to perform in New Jersey last month, but postponed the show to rest her voice.

On the final night of her tour, she thanked her crew members, dancers, background singers for their work on the six-month tour, which included two nights at Wembley Stadium in June.

She also thanked her fans for helping her live out her dreams onstage.

"I have so much energy because of you guys feeding it to me," she said.

"I really wanted to make this show special. This is definitely my dream right here.

"I dreamt that I would be doing this and I'm actually doing it, and I could not be here without you and your support.

"I wake up every morning I thank God to be able to do what I love and to be able to perform and entertain you guys.

"So thank you for trusting me and allowing me to still be here 20 years [later]. Thank you."

Beyonce's Formation world tour is the highest grossing of the year so far. It's made $210m (£169m) from 40 shows.