It is easy to drive past the American University of Afghanistan, barricaded by blast walls and guard towers. There is no sign, no American flag, no emblem.

But those who slip through its nondescript door enter a tiny corner of this country that is unique, wondrous and heavily subsidized by U.S. taxpayers. Young men and women mingle freely, in contravention of the country’s conservative social norms. Some female students walk around unveiled, a break with custom that is unthinkable elsewhere in the country. Inside classrooms, American professors stoke lively debates and use cutting-edge technology.

In many ways, the university embodies the type of country that the United States set out to build a decade ago; some still hope that the school will endure as a pillar of the legacy of America’s longest war. Yet, as U.S. troops prepare to end their combat mission in Afghanistan by the end of next year, there is a foreboding about the future on this campus, and a sense that the school may not survive as the incubator of talent and entrepreneurship that Washington sought to create.

Long-term funding for the university is uncertain, and many students have come to see their degrees as a ticket out of Afghanistan.

The country could be headed toward another civil war, said Sayed Mansoor Afzali, the vice president of the university’s student government association, who crammed a four-year degree program into three — determined to graduate before the end of 2014.

The majority of students are making plans to leave the country, Afzali said, adding: “It’s a minor group, those who believe they can stay here and build a career for themselves.”

Like just about everything else that the West has built in Afghanistan over the past decade, the American University of Kabul remains half-complete, heavily reliant on foreign aid for the foreseeable future and seized by a paralyzing question: How much will endure after the U.S. military leaves by the end of next year?

What has been built, though far from perfect, is nonetheless remarkable, said Leslie Schweitzer, who heads the Friends of the American University of Afghanistan, a Washington-based fundraising group. She said graduates have been snatched up by government ministries and the Afghan private sector.

“Keeping them in the country is very, very important,” Schweitzer said. “You can see these leaders develop, and you see in them a desire for a transparent government. These are the people who will make it happen.”

Around campus these days, students talk about the end of 2014 with anxiety and resignation.

“It’s a big fear for everyone,” said Mubareka Sahar Fetrat, 17, one of the hundreds of Afghan women attending college on State Department scholarships. “When I talk to people, no one is optimistic for the future.”

The war economy that turned Kabul into a boomtown and gave this battle-scarred capital a flare of modernity is flattening. As American officials insist that Afghans are now in the lead — a talking point widely interpreted as an unmistakable sign of disengagement — students who have tied their fate to the U.S. project here are struggling to understand where that leaves them. Female students, in particular, appear eager to parlay their American degrees into a way out of the country.

Khatera Amine, 20, a political science major, says she might want to lay down roots in Kabul at some point. But not before getting a master’s degree abroad and dodging what she sees as a looming period of chaotic transition.

“Most of the girls here are really afraid that after 2014 the Taliban regime might come back and we won’t be able to be educated or leave home,” said Amine, a vivacious, wide-eyed student who worries that the political elite will cut a deal with the Taliban once the Americans leave. Her top choice would be a U.S. graduate program, but she would settle for pretty much anywhere else, given the difficulty of obtaining an American visa. “The big effect will be on women — so, of course, we worry,” she added.

That sense of gloom is hard to reconcile with the high hopes for the university and Afghanistan in 2005, when the war in Iraq was turning into a quagmire and America’s other, less visible war, appeared to be going comparatively well. Laura Bush, the first lady at the time, traveled to Kabul that spring to announce that the United States would fund an American university in Kabul to “aggressively reach out” to Afghan women.

“We are only a few years removed from the rule of the terrorists, when women were denied education and every basic human right,” she proclaimed in a speech in Kabul. “That tyranny has been replaced by a young democracy, and the power of freedom is on display across Afghanistan.”

After the commitment was announced, the Afghan government provided an 85-acre lot for the campus. The small, decaying property was itself a sobering reminder of how suddenly and dramatically this country has been transformed when power has changed hands over the years. It had been the site of an American school in the 1960s and 1970s before it became an intelligence hub during the Soviet occupation in the 1980s.

The United States made its first big investment in the university in 2008, awarding a $42 million U.S. Agency for International Development grant. By the end of the year, more than 350 students had enrolled, gradually turning the run-down compound into a lively campus.

The following year, C. Michael Smith, a veteran college administrator, was startled to get a call inquiring whether he would consider running the school. Smith was exhausted after four years at the helm of the American University of Nigeria, which he was hired to launch after a Nigerian entrepreneur provided the funding.

“We were at a point where we thought we’d take a break and recuperate our strength,” he said in a phone interview, chuckling. “I was a bit reticent.”

After a trip to Kabul, Smith took the job. During subsequent years, as security deteriorated in much of the country, the university grew steadily. Its first graduates walked away with diplomas in 2011. This year, the school launched a law department, enrollment rose to nearly 1,000, and school leaders broke ground on a sleekly designed $5 million building — funded by the Pentagon — to run a business incubator for women.

“For the long-term viability of a vibrant, pluralistic state, this is probably the most important investment we can make,” said Ryan C. Crocker, a former U.S. ambassador to Afghanistan, who traveled to Kabul in the spring to deliver a commencement speech.

The university gets about 60 percent of its funding from USAID and the rest from tuition, much of which is subsidized by State Department grants.

This year, USAID approved a new $42 million grant to keep the school afloat for the next five years. Smith said his goal is to find the revenue to wean the school from foreign funding by at least an additional 20 percent within that time frame. But he acknowledges that will be an uphill battle as the Afghan economy contracts because of a slowdown of Western aid.

Smith, aided by the fundraising group in Washington, has stepped up efforts this year, hoping to find a major donor willing to sink significant capital into the venture. The torrent of bad news about Afghanistan is the biggest challenge, he said.

“You have to break through an initial impression that everything here is nothing but violence and chaos, a disbelief that there could possibly be a university here worth supporting,” Smith said.