Tania Herrera graduated from high school in Loudoun County with a 3.2 grade-point average and an admission letter from her dream school: Radford University. Then she hit a roadblock. As an undocumented immigrant from El Salvador, Herrera was not eligible for in-state tuition at the Virginia public school.

She spent the summer scrambling to find a scholarship or a relative willing to co-sign for a loan to pay the $29,000 annual tuition required for out-of-state students. But staring down the Aug. 15 deadline to submit her deposit, the 19-year-old conceded Wednesday that she would have to change course. She will spend the year working full time and plans to enroll in community college classes.

“If I really want to go to college, I’ll go to college. I’ll do it somehow,” said Herrera, who wants to study theater and psychology. “I’ll just have to work for it.”

If she lived just a few miles away, in Maryland, Herrera’s path to college might be different. Maryland is one of about a dozen states that passed Dream Act legislation that grants in-state tuition to undocumented students who meet certain qualifications. The two neighboring states highlight growing differences in academic opportunities for the children of illegal immigrants as state lawmakers try to address what has become a burning political issue.

Ricardo Campos, 24, of Silver Spring was in a different kind of holding pattern before Maryland voters upheld the law in a November referendum.

Campos, who came to the United States from El Salvador more than a decade ago, had finished two years at Montgomery College on a pre-med track. But he could not afford the University of Maryland’s out-of-state tuition, blocking him from completing his bachelor’s degree. So he began pursuing a second associate’s degree in nursing.

“I still wanted to go to school,” Campos said. “I didn’t want to lose the habit.”

The university gates finally opened to him in the fall, aided by the Maryland Dream Act. This year, he plans to continue his pre-med studies at Maryland's flagship public university.

In addition to the Dream Act, Campos received help from President Obama’s executive order last summer that allowed undocumented immigrants who came to the United States as children to apply for two-year work permits and defer deportation proceedings.

Maryland’s attorney general ruled in February that students who are approved for the federal “ deferred action for childhood arrivals ” are eligible to be treated as state residents for the pur­poses of university tuition.

That means aspiring college students in Maryland who are undocumented have two pathways to obtain in-state tuition: by meeting the qualifications detailed in the new state law or by obtaining federal waivers.

Most are pursuing the latter approach, which is less complicated, said Kimberly Propeack, political director for CASA of Maryland, an advocacy group. The state law requires students to submit paperwork proving that they and their parents filed taxes. It also requires them to attend a community college first.

One year after Obama’s executive order went into effect, 400,000 students have been approved for the federal deferred action, including about 5,400 in Maryland and more than 6,200 in Virginia.

Herrera was among them. She was approved in the middle of her senior year at Dominion High School and was sent a Social Security number. But she didn’t realize until June, well after her admissions letters had arrived, that the number would not make her eligible for federal financial aid.

A bill for a Virginia version of the Dream Act could have helped her. Proposed legislation was introduced in Richmond this year and was approved by the House Education Committee, making it more successful than any previous attempt. But then the bill stalled.

Del. Alfonso H. Lopez (D-Arlington), who co-sponsored the legislation with Del. Thomas Davis Rust (R-Fairfax), said he is optimistic about the ­chances of the legislation passing next year, citing a coalition of supporters including immigration advocates, educators and a growing number of Republican lawmakers.

Herrera said she plans to wait for the law to change and then hopes to pursue her goal of attending a four-year college.

”I know I may get impatient waiting,” she said. “But I think it will be worth it.”