Discuss as:

Teen stuck in Mexico over 'Leap Day' error can return home

Elizabeth Olivas, who came to the U.S. illegally at age 4, went to Mexico to get a green card or visa to fulfill requirements of U.S. law and has not been allowed to return since she missed the deadline by a day.

Updated 3:45 pm EST -- A teen stuck in Mexico because she missed an immigration deadline due to a “Leap Day” error received a visa on Thursday that will allow her to return to the US just in time to give the salutatorian speech at her high school graduation this weekend, her lawyer said.

Elizabeth Olivas, who came from Mexico when she was four, failed to meet the visa requirement by one day due to it being a leap year and had been stuck in Chihuahua, Mexico, for the last six weeks while she awaited a decision from the U.S. Consulate in Ciudad Juarez, according to her lawyer, Sarah Moshe.

“Just got out visa in my hands. I’m coming home!” she wrote in a text message to Moshe. “I’m soo happy!”

Moshe said in an email statement that she also received electronic correspondence from the State Department, reading: “The waiver was approved, and we just finished issuing and printing her visa.”

Olivas, who is eligible for a green card because her father is a U.S. citizen, faced a possible three-year bar from entering the country because of the calendar error. People in her situation are allowed 180 days unlawful presence in the country after their 18th birthday, but after that time would need a waiver, said Moshe, who did not have any details about Olivas’ mother.

Olivas traveled from her home in Indiana to Mexico on April 17, the day she believed was her last chance to be within that180-day window. Not knowing how long it might take to get an appointment once she was in Mexico, Olivas and her lawyer decided she should chose to stay in the U.S. for as long as she could beforehand, Moshe told msnbc.com.

“I would never have sent her had I had any question in my mind,” Moshe said Wednesday evening, noting two legal calculators they had used said Olivas would need to be in Mexico on April 17, not April 16, to apply for an immigrant visa. “It was a very innocent mistake … we were aware within days essentially and tried very hard to work in that timeframe but to no avail.”

Olivas, who turned 18 on Oct. 18, 2011, had sought the expedited waiver after learning about the error. She is graduating from Frankfort High School in Frankfort, Ind., with a GPA over 3.9, was winter homecoming queen and has already been accepted into nursing programs. As part of the 400-page waiver application, she submitted at least 25 letters of support from her instructors, Moshe said.

Almost-deported valedictorian helps introduce immigration reform bill

Waiting at her paternal grandparents’ home in Chihuahua, Mexico -- relatives she had not met before -- she had experienced the highs and lows of the slow-moving immigration process. She has also missed her prom, Moshe said.

“In the past, on the days when there’s been no movement, it’s been really hard for her,” Moshe said before the decision. “Dealing with huge government agencies, there are days when nobody responds to email or returns a phone call. But she’s really excited right now, I mean she’s really hopeful.”

Principal Steve Edwards told the Indianapolis Star that Olivas has done her homework online while she has been in Mexico and her grades had not been affected.

Can an illegal immigrant become a lawyer?

"This is a very skilled, talented, beautiful young lady. This hurts me and is one of the hardest things I've ever dealt with in my life," he said.

For the waiver application, Moshe argued that Olivas’ absence would prove a medical hardship on her father, who suffers from diabetes and high blood pressure, among other ailments.

“Last time he was in my office, he literally put his hand in front of me and stuck a finger out and said take my finger if you need to, just do anything,” Moshe said.

Mom of deported teen runaway files federal lawsuit

Maria Elena-Upson, a Dallas-based spokeswoman for USCIS, told the Indianapolis Star that the agency normally took applications as they came in and not out of turn. The process typically takes two to three months.

"I can sympathize with this situation, but it would not be correct," Elena-Upson told the newspaper.

Moshe had said she would appeal if the consulate denied Olivas’ waiver application – a step that’s no longer necessary.
“She will certainly enjoy a well-deserved graduation celebration on Saturday!” she wrote in an email.


More content from msnbc.com and NBC News:

Follow US News on msnbc.com on Twitter and Facebook