CreditErin Trieb for The New York Times
KABUL, Afghanistan — One is a barber, 22, who found his voice in rap, his passionate rhymes expressing the angst of a generation that has known nothing but war. His religious mother disapproves of music, switching the channel when a song comes on.
The other is a girl, 16, who was raised by her widowed mother in a conservative eastern city. When she appears onstage, dazzling in a vivid green head scarf and silver-trimmed dress, she owes it to the mother who put her foot down in the face of protest from relatives.
These are the unlikely stars of a music competition modeled after “American Idol” that provides weary Afghans a much-needed release on weekend nights.
In its 12th season, the show, “Afghan Star,” is pure entertainment: Young artists, dressed in chic local and Western wardrobes by a young local designer, belt out songs onstage, accompanied by an orchestra of Afghan and Western instruments. People can vote by text.
But amid an escalating battle with extremists, entertainment like this is a risky business, especially in a conservative society that looks down on music as vulgar. And especially when it includes women.
In previous seasons, the network that televises “Afghan Star,” Tolo TV, would rent spaces in the city to hold the show. After threats to its staff increased — a Taliban car bomb killed seven colleagues last year — the network decided this season to move the studios inside a gated street in Kabul’s protected diplomatic enclave.
Still, war has a way of disrupting the music.
During one recent episode, a female contestant changed her upbeat song to a mournful one that she performed dressed mostly in black. Her uncle had been killed in a suicide bombing in front of the Afghan Parliament that week.
“We told her she didn’t need to perform that week,” said Massoud Sanjer, the head of Tolo’s entertainment wing. “She said, ‘No, life continues.’ But she changed her song selection.”
None of this dissuades contestants like Zulala Hashemi, the 16-year-old who was raised by her widowed mother in Jalalabad, a city so conservative that women are rarely seen on the streets — and when they do venture out, almost always in burqas.
Between recordings, on the occasions the mother and daughter return home, they put on their burqas and disappear into anonymity.
Zulala always sang at home, but never took formal music lessons. This year, when she saw an ad for “Afghan Star” tryouts, she asked her mother if she could participate. She was surprised to win a spot on the show, which would bring her to Kabul.
“She has a voice that is very particular to Afghanistan’s geography,” said Waheed Qasemi, a revered Afghan artist who is the show’s music director. “It’s a mountainous voice.”
But for her voice to be recognized, Zulala has had to put up with the resistance of her relatives, including her brother, who is a police officer. She is also afraid of facing her teachers and classmates because “they may get angry” with her.
“I knew they wouldn’t give me permission, and until this day they haven’t given me permission,” Zulala said about her relatives. “But I wanted to show my talent to the people; I didn’t want my talent to go in vain.”
What made it all possible was the support of her mother, Mermen Hashemi, who has a degree in economics and has worked in many senior jobs in the province, including running the government archives. Mrs. Hashemi has raised nine children on her own since her husband died of an illness 16 years ago, and she said she would not put up with meddling from relatives.
“I have earned with my own hands, and I have defended myself and my children,” Mrs. Hashemi said. “No one has given me anything, and I have not given anyone time to say anything about my children.”
Mrs. Hashemi has been with her daughter in Kabul over the last three months, following her “like a shadow,” according to Mr. Sanjer. She is in the green room when Zulala performs on stage, and she follows her into the dressing room when Zulala needs to change between performances.
Zulala is one of the three remaining contestants in the competition, which is set to end on the Persian New Year’s Eve in mid-March.
The favorite, however, is Sayed Jamal Mubarez, the barber from the northern city of Mazar-i-Sharif, who tops the votes week after week.
His rising fame has made his mother relent: She will watch him perform, but only if he stays away from vulgarities and there are no women gyrating in his video clips.
Mr. Mubarez discovered rap only four years ago. At his barbershop, he would rap along to the Iranian artists playing on his sound system as he cut hair. Their words of protest spoke to him.
About two years ago, Mr. Mubarez started writing his own verses. A purist, he has since stopped listening to other rap to make sure his words come from the heart. He writes at night, and if he can’t get a piece done in one 90-minute sitting he drops it as forced.
“If I get up from writing it and say I will complete it another time, that rap cannot be written later,” Mr. Mubarez said.
He has gained a large following in just four months on the show, a remarkable rise in a country that is only beginning to discover rap music. He sticks to subjects that speak to the people.
Many of his raps are inspired by personal stories, like one he wrote about his lack of education. Mr. Mubarez had a cousin as a classmate in school who later went on to university, while Mr. Mubarez, the oldest son in the family, worked jobs from the age of 12 — churning asphalt, clearing snow — to bring money home to his father.
Years later, the cousin with the university diploma stayed with Mr. Mubarez’s family. Mr. Mubarez said he was nervous around him, feeling backward and ashamed. After he dropped off the cousin at the bus station one evening, he put his feelings to verse.
“From the earth to the sky is the difference between us/Don’t say why I didn’t study — just go, let us be.”
From his barbershop, he posted the rap on YouTube and shared it on Facebook so people, particularly the cousin, could see “that if Jamal didn’t study, it was because his life was different than yours.”
Even male stars like Mr. Mubarez feel the heavy pressure of society when performing. That was on display during a recent episode, when he performed a duet with Aryana Sayeed, the Afghan pop sensation who is a judge on the show.
Ms. Sayeed, who lives much of the year abroad, is known as much for her music as for her bold style, pushing the boundaries of a conservative society with revealing dresses.
On the day of the performance, she was wearing a blue dress that accentuated her curves; Mr. Mubarez, in a red New York Yankees cap over a white bandanna, was wearing red shoes, white pants and his signature black leather jacket.
Midway through the performance, much to the pleasure of the audience, the two singers broke into a little dance, shimmying as they stepped left and right.
When viewers tuned into the show after the taping, they found no trace of the performance. The executives had cut it out, apparently because Ms. Sayeed’s appearance had been too provocative.
But they put the video online, and Mr. Mubarez’s family got to watch it.
“They are a little uncomfortable,” Mr. Mubarez said. “My mother is unhappy.”