HAVANA — “I know you’ve been waiting a long time for a party like this,” the D.J. and producer Diplo called out to a sea of pulsating young Cubans here on Sunday evening, during a free concert by his Caribbean-influenced electronic group, Major Lazer.

The spectacle at a waterfront plaza known as the José Martí Anti-Imperialist Platform, in front of the newly established United States Embassy, was remarkable: a seemingly endless crowd of an estimated 450,000 to a half-million stylish locals, largely teenagers, bouncing, dancing and roaring to amped-up electronic dance music, or E.D.M.

This was the first concert in Cuba by a major pop act from the United States since the reinstatement of diplomatic relations between the two countries in December 2014. (Pop acts very rarely made it to Cuba during the embargo; the last large-scale concert was by the band Audioslave in 2005.) It notably featured a youth-oriented genre — E.D.M. is a rising trend among Cubans after trickling down from a boom in the United States and Europe — and a globe-trotting star who’d been quietly plotting his way here for 14 months. The show was also government-approved, and therefore largely depoliticized, its restrictions demonstrating the continuing tension between life on this island for the past half-century and the Cuban culture of the future.

“It’s the very first time I’ve seen my generation so happy,” said Robin Pedraja, 28, the creative director of Vistar, an independent online culture magazine.