Several New York City parties offer spaces where anyone and everyone can let loose, come together and find comfort in Middle Eastern and North African music.Just before midnight on a Friday in June, a short line formed outside Elsewhere, a music venue and nightclub in Bushwick, Brooklyn. Saphe Shamoun, one of the D.J.s performing that night, gingerly approached two women in the queue.“Are you here for Laylit?” he asked. They nodded, and Mr. Shamoun directed them toward another entrance — and a much longer line — further up the block.Laylit, or “the night of” in Arabic, is a party based in New York and Montreal that spotlights music from the Middle East and North Africa and its diaspora.It has had a residency at Elsewhere since October, but this night was special: The event had become so popular that for the first time, it was being held not in the venue’s smaller rooms but in its cavernous hall, where over 800 people would soon dance under a shimmering disco ball and hypnotic light show.On the bill: a performance by Anya Kneez, a Lebanese drag queen, and D.J. sets highlighting Arabic pop, hip-hop, folk and electronic music.A decade ago, it was practically unheard-of for a major New York club to regularly host a Middle Eastern-themed party. But now, Laylit is part of a thriving scene in Brooklyn that puts Middle Eastern and North African music front and center.The events vary in style, but they all celebrate cultures that the promoters say have been overlooked in the West. And they offer many New Yorkers a sense of comfort in a teeming city that can nonetheless feel isolating, especially after more than two years of a pandemic.“It’s so, so beautiful to see the community coming together,” said Felukah, a hip-hop artist who moved to New York from Egypt in 2018 and is a regular at Laylit and other parties like it. “The sounds remind me of home.”For some partygoers, nostalgia is the main attraction. Yet each event also looks toward the future, be it through challenging stereotypical notions of Middle Eastern culture or by championing inclusivity and progressive ideals.Laylit, for one, has created a shared space for Arabs who hold those values, said Mr. Shamoun, a Syrian D.J. and Ph.D. candidate who founded the party in 2018 with Wake Island, a Montreal-based music duo made up of Philippe Manasseh and Nadim Maghzal.Ironically, it wasn’t until the two left their native Lebanon that they embraced its sounds.“It wasn’t cool when I was growing up to play Arabic music,” Mr. Maghzal said.“It was actually uncool,” Mr. Manasseh added.And after emigrating to Montreal in the early 2000s, they actively separated themselves from their culture, fearing discrimination and feeling a sense of duty to assimilate, Mr. Manasseh said.But now, they use Laylit as an outlet to rediscover their roots. In September, they’ll be celebrating the party’s fourth anniversary with another show at Elsewhere, and a tour across Montreal, Detroit and Washington, D.C.Ana Masreya, an Egyptian drag queen, getting ready before a drag show at Littlefield, in Brooklyn.Ahmed Gaber for The New York TimesDisco Tehran, a dance party and performance project that channels the international music culture of 1970s Iran, was also born out of the immigrant experience. The organizers, Arya Ghavamian and Mani Nilchiani, said it took years to get it off the ground.Nearly a decade ago, Mr. Ghavamian, an Iranian filmmaker who had moved to the United States a few years earlier, approached an organization about throwing a party to celebrate Nowruz, a holiday that marks the beginning of the Persian New Year and is observed in several countries across Central and West Asia. “It was a ‘no,’” Mr. Ghavamian said.A few years later, he began hosting get-togethers in his apartment where he would cook Persian cuisine and invite musicians to play. By early 2018, his apartment could no longer accommodate the crowds, so he and Mr. Nilchiani hosted their first public Disco Tehran event: the long-shelved Nowruz celebration.The party has since expanded and evolved, and it now includes a film project and community outreach efforts. It celebrated its fourth anniversary last month at the Sultan Room, a nightclub and eatery in Bushwick, with an eclectic playlist and performances by Alsarah and the Nubatones, an East African retro pop band, and Epilogio, a Puerto Rican indie-funk band.Disco Tehran, Mr. Ghavamian said, “is about a collection of different cultures who may not have anything to do with each other on a given day, but they come together.”And the project is on its third European tour, which gives the organizers the sense that they “have a place wherever we are in the world,” Mr. Ghavamian said. Its next New York event is Aug. 13, at the Knockdown Center in Queens.Yalla! Party Project also grew out of intimate apartment gatherings, hosting its first public event in the spring of 2018. (“Yalla” translates to “let’s go” or “come on” in Arabic.) Its founder yearned for a queer party that featured Southwest Asian and North African music.Over the years, Yalla! has expanded into an arts collective and community-building exercise. It is starting a professional directory to help people find jobs and it runs a market that supports small businesses run by women, people of color and queer people.Its parties reflect New York’s cultural diversity. At a May show at the Sultan Room, an Eritrean henna artist drew intricate patterns on a man’s palm while partygoers danced to R&B and Lebanese pop. Yalla! also ramped up programming during Pride month, with four events spread across venues in Queens, Brooklyn and the Bronx.Hanan Selim, center, dances with her husband and friends during a Haza party in Bushwick, Brooklyn.Ahmed Gaber for The New York TimesOnce word of Yalla! got around, similar events followed. It was at an early Yalla! show where Mr. Maghzal, of Laylit, first spun Arabic music. A year later, a drag queen named Ana Masreya — her name means “I’m an Egyptian woman” in Arabic — organized a Middle Eastern and North African cabaret called Nefertitties, a play on the name of the ancient Egyptian queen.Ana celebrated her show’s third anniversary in May with an event at Littlefield, in Gowanus, and visited Washington, D.C., for a cabaret in late June. For her grand entrance at the anniversary show, she was carried in on a makeshift sedan chair, shrouded by a gold mesh sheet, which she later removed to reveal a gold crown modeled after that of Nefertiti.Onstage, Ana spoke about her experience being a publicly known L.G.B.T.Q. person from the Middle East, a region where homosexuality is largely taboo and can, in some nations, lead to persecution. “It’s mad scary sometimes,” Ana said.The night featured drag performances by Rifi Royalty, who is Egyptian American, and Meh Mooni, who is Iranian American; a set by Felukah; and a belly-dancing contest set to an Egyptian song that is a staple at Arab parties: “Shik Shak Shok.”The following week, the song would be played again at the Sultan Room’s rooftop during Haza, a dance party and radio show that began in 2019 and spotlights artists from the Middle East and African diasporas and beyond.One of its founders, an Egyptian American D.J. and creative writing consultant who performs under the name Myyuh, grew up in a predominantly white town in Connecticut, where she said she was largely detached from Egyptian culture. She felt embarrassed when her mother would blast Arabic music at home, she said.But at Haza, she turned to it for comfort — and blasted it on a pulsating dance floor while fellow Arabs ululated in celebration under the Bushwick sky. (Haza will return to the Sultan Room for its next show on July 29.)“We’re creating a totally different experience with these songs,” Myyuh said.Her co-founder, an Egyptian D.J. and audio engineer who performs under the name Carmen Sandiego, likened the experience to a hug.“It’s everything that you know and love,” she said. “And it’s not just you, but the person next to you is singing the same thing because they understand why this is so meaningful.”For Mr. Shamoun, of Laylit, that experience is particularly important for those who have fled the Middle East amid war, uprisings and refugee crises.“We’ve been robbed of a present and a future in the Arab world,” he said.When he’s behind the decks at his shows, he often spots recent immigrants and hopes the songs he plays transport them back home, if only for a few minutes.As the events continue to generate buzz, few of the promoters appear to be in competition — in fact, most of them collaborate with each other.Ana Masreya performed at a Laylit party earlier this month, drawing cheers from the crowd, while Myyuh was in the D.J. lineup.Mr. Manasseh believes the scene grew out of what he calls an “affirm yourself on the dance floor” movement that took hold after the aughts and grew stronger when Donald J. Trump became president.Rock was suddenly out, dance and electronic music were in, and more people of color and L.G.B.T.Q. people were creating spaces where they felt seen and heard.Even though Laylit is seemingly rooted in faraway cultures, Mr. Manasseh credits its existence to a single city.“All this was inspired and enabled by New York,” he said. More