(CNN) -- The Indiana high school student who was in danger of missing her graduation ceremony because of a visa mix-up in Mexico returned home early Friday morning.
The smiling teen was met at the Indianapolis International Airport by family members, balloons and signs.
"Now I can continue to pursue my dreams," Elizabeth Olivas, 17, told reporters.
Her attorney, Sarah Moshe, had said the U.S. State Department approved a waiver, allowing Olivas to return home and deliver the salutatorian speech at Frankfort High School on Saturday.
An undocumented immigrant who was brought to the United States by her parents when she was 4, Olivas traveled to Ciudad Juarez, Mexico, last month to beat a deadline to apply for a visa.
According to immigration laws, children of immigrant parents have until 180 days from their 18th birthday to leave the United States for their country of origin and apply for a visa. The consulate in Mexico granted Olivas an appointment for May 4.
Moshe calculated on two different legal calendars that the 180th day would fall on April 17, so Olivas departed for Mexico that day. But at her May 4 appointment, Olivas was told she had left the United States on the 181st day.
The calendars Moshe used did not account for the leap year.
The mix-up could have meant Olivas would be banned from the United States for three years, living with her grandparents in Juarez until she could apply again.
"The waiver was approved, and we just finished issuing and printing her visa," read a statement from the U.S. State Department, according to Moshe. "We gave her the visa packet and I assume she will be leaving the Consulate momentarily (visa in hand!). Congrats and best of luck to Elizabeth and her family! She is very lucky to have such a great team working on her behalf."
Olivas' father is a naturalized U.S. citizen. He filed an immigrant visa petition for his daughter to gain legal status.
The petition process began years ago, but the process was slow, Olivas said. She said she had been "essentially begging for an appointment."
"The problem was we couldn't secure an appointment at the consulate," Moshe said.
In the six weeks since Olivas' arrival in Mexico, she participated in classes remotely with her laptop and kept her grades up during the final weeks of school.
Her only hope to return to Indiana quickly was a 400-page parental hardship waiver that she presented to U.S. consulate officials Thursday. Her appeal argued her diabetic father would suffer from being apart from his daughter.
Now back in the United States she plans to apply for permanent resident status.
Steve Edwards, principal at Frankfort High School, called Olivas a "phenomenal kid."
"She is a mentor to those younger than her," Edwards said. "There is just not a bad thing to say about Elizabeth. She's an awesome girl."
Olivas' medal and diploma will be waiting for her on Saturday, he said.
"Regardless of this whole process, she's graduating on Saturday," Edwards said. "We expect her to be at the graduation ceremony on Saturday. We expect her to be in front of the crowd and give her speech. We expect to see her at graduation."