"I hope in the midst of all that is happening in the world, you can take a moment to celebrate the accomplishment of graduating," Katy Perry wrote
Katy Perry
Credit: Katy Perry/Instagram

Katy Perry treated the Class of 2020 to a special performance of her latest hit "Daisies."

On Sunday, the pregnant singer — who is expecting her first child, a baby girl, with fiancé Orlando Bloom — performed the empowering anthem during YouTube's "Dear Class of 2020" virtual commencement, which was created after in-person graduation ceremonies were canceled due to the novel coronavirus, COVID-19, pandemic.

Wearing a bump-hugging white gown and donning Marilyn Monroe-esque hair and makeup, Perry, 35, began her performance from behind a silver metallic fringe curtain wall. As she sang the song's lyrics, which are all about going for your dreams, the camera followed her closely across the room.

In addition to "Daisies," the star performed her hit 2010 song "Firework."

Ahead of the virtual celebration, Perry teased her performance with a post on Instagram. In addition to sharing a preview clip, Perry also shared two photos from the shoot: one full-body shot of herself posing barefoot on a stage and one close-up taken in front of the metallic fringe curtain.

"#DearClassof2020, I hope in the midst of all that is happening in the world, you can take a moment to celebrate the accomplishment of graduating. You are the future, and I know you will take everything you’ve learned to make the world a better place. Never let em change you 💛," she captioned the post.

Over the past week, Perry has been vocal on social media about her support for Black Lives Matter in wake of the recent deaths of George Floyd and Breonna Taylor at the hands of police. She participated in "Blackout Tuesday" by posting a black square to Instagram with a message saying she has spent "the last few days watching, listening and reflecting about how to utilize my privilege and platform."

"This soon to be mother is going to work hard to make damn sure this world is a more just place for every child," she wrote. "Black Lives Matter."

In May, Perry gave an update about her pregnancy, joking in an interview with Radio.com that she is "turning into Shrek, size-wise" while Bloom, 43, is "turning into The Hulk."

Later, she added that she's "getting really good" at doing her own hair and makeup. "I'm doing my own hair and makeup, I'm doing my own styling, I'm doing my own ring lighting and other lighting, and doing a lot of the logistics behind the scenes," she said. "All the asks are still there, and you usually go and fulfill them at the places, but now they’re just on your turf. Which is great, because this is my choice, to release a record rather than delay it."

Amid the global coronavirus pandemic, Perry has been staying at home with several young children, including her 8-month-old nephew, 3 and 6-year-old nieces and occasionally her 9-year-old stepson Flynn (whom Bloom shares with ex-wife Miranda Kerr). "I'm learning to be a mom fast," she told host Graham Norton during a virtual appearance on his show.

"Kids gravitate towards me through my music, so I am used to them, but I am not used to being woken up really early in the morning by them staring at me from the side of my bed!" Perry joked.

The mom-to-be first announced her pregnancy in March when she premiered the music video for her song, "Never Worn White."

"That was quite early on, so I think half of [the baby bump] was Taco Bell!" she joked to Norton. "I thought, 'What better way to reveal big news in my life to my fans who have grown up with me, than via music,' " she added.

RELATED VIDEO: Pregnant Katy Perry Shows Off Growing Baby Bump and Says Daughter Has Been Kicking: 'It's Painful!'

In addition to Perry's performance, YouTube's "Dear Class of 2020" virtual commencement featured appearances from more than 70 famous faces, from music and movie stars like Taylor Swift and Michael B. Jordan, to celebrity power couples like Dwyane Wade and Gabrielle Union, and Tom Hanks and Rita Wilson.

To kick off the event, Lizzo and the New York Philharmonic teamed up for a performance of “Pomp and Circumstance,” which was followed by remarks from Alicia Keys, Beyoncé and Barack and Michelle Obama.

Additional famous faces providing remarks on the show include BTS, Malala Yousafzai, former Secretary of State Condoleezza Rice, Alphabet and Google CEO Sundar Pichai and former Secretary of Defense Robert M. Gates.

Various stars will also come together for special performances during the event, including a reading of the Maya Angelou poem “Still I Rise” by Tracee Ellis Ross, Yara Shahidi, Kelly Rowland, Shonda Rhimes, Misty Copeland and Janelle Monáe.

Billie Eilish, Camila Mendes, John Mulaney, Chris Pine, Kerry Washington, Justin Timberlake, Demi Lovato, Russell Wilson and Ciara, and Seth Rogen are among the other celebrities who took part in the event.

“Dear Class of 2020” is airing now on the YouTube Originals channel and the Learn@Home site.