Although he said he was taking time to focus on himself before getting back to music, Justin Bieber still went to Coachella and got on stage when prompted by friend Ariana Grande.

E! News reported that the 2019 Coachella headliner surprised the crowd when she invited the 25-year-old newlywed on stage during her performance.

>> Read more trending news

"Coachella, I wasn't gonna bring any guests out tonight, but my friend Justin Bieber came all the way out to spend some time with y'all,” Grande said.

Justin Bieber joined Ariana Grande during her Coachella set during weekend three of the festival.

Credit: AP Photo

icon to expand image

Credit: AP Photo

Bieber appeared on stage as fans screamed.

“We thought it might be fun to do something for you guys,” Grande said. “This was not planned at all. Thank you for being here Justin. We love you so much.”

Related: Justin Bieber promises new music after he works on 'deep rooted issues'

Bieber performed his 2015 single “Sorry” and thanked the audience afterward, saying, “I haven’t been on a stage in, like, two years.”

Bieber also teased that he would be back with new music soon, Billboard reported.

“I had to get my groove back, I had to get my swag back, you know what I'm saying? Thank you so much, Coachella, thank you so much, Ariana Grande,” he said. “And by the way -- album coming soon.”

So Bieber's music break may be over sooner than fans thought. After the performance, he tweeted, "That felt right."