Singer Lady Gaga spent several days hiding in a hotel in Baku, Azerbaijan to keep her presence a secret before she performed at the European Games.

Performing the John Lennon song "Imagine," Lady Gaga was a surprise addition to the program for the inaugural games Friday. Her participation was only revealed part-way through the two-hour show.

Catherine Ugwu, who coordinated the ceremony for games organizers, said they had to "work very hard on keeping it a secret" and that the singer "was kind enough to stay in a hotel and not move for several days."

Lady Gaga, who is known for her strong advocacy for gay rights, has faced criticism from some fans for performing in Azerbaijan, whose government has been widely criticized over its human rights record.