A nurse who was separated from her children and deported to Mexico last year after more than two decades in Oakland has won her improbable fight to return to the United States.

Maria Mendoza-Sanchez said she got a phone call Friday morning from the U.S. Consulate in Mexico City saying her visa had been approved by U.S. Citizenship and Immigration Services. She’s been staying with her sister in a town three hours from the capital and couldn’t make the drive Friday because of air-pollution restrictions, but plans to pick up the paperwork Monday. And a week or two later, she’ll be flying back to the Bay Area.

“This is amazing. ... I could barely believe it,” said Mendoza-Sanchez, 47, whose story has been covered extensively in The Chronicle and elsewhere and has drawn support from local and statewide political leaders. They include Sen. Dianne Feinstein, D-Calif., Rep. Barbara Lee, D-Oakland, and Oakland Mayor Libby Schaaf. Staffers at Oakland’s Highland Hospital, where Mendoza-Sanchez worked as an oncology nurse, held a rally to protest her deportation.

After hearing the news Friday, her first call was to her four children in Oakland. “I told them to wake up,” she said, “I asked them to gather in one room, and I told them, ‘Mommy’s coming home.’ They were very happy. I said, ‘Get ready for school.’”

The journey home required a winning ticket in a visa lottery this spring, then a series of approvals from agencies in a Trump administration that has taken an increasingly hard line on immigration from Latin America. The visa is an H-1B, reserved for skilled workers such as nurses in hospital cancer wards.

The timing of Friday’s call came as a surprise, because a consular official had told Mendoza-Sanchez this week that she would probably get a final decision in about a month.

“I think because of all of the pressure (from politicians and the public), they sped it up,” said her immigration lawyer, Camiel Becker.

Feinstein said Friday she had met with Mendoza-Sanchez and kept in close contact with her children over the past year.

“Given the importance of family unity and Maria’s contributions to her community, I’m pleased this wrong is finally being rectified,” the senator said in a statement. “This is the kind of common sense and compassion our immigration system desperately needs more of.”

Lee said the case was “a stark example of the damage that the Trump administration’s inhumane zero-tolerance policy has wreaked on families across the country.”

Schaaf likewise said the family never should have been torn apart.

“Oakland is safer, stronger and better with Maria Mendoza-Sanchez in our community,” the mayor said.

Mendoza-Sanchez had crossed the border from Mexico without a visa in 1994 to join her husband, Eusebio Sanchez, who had entered the U.S. five years earlier. She obtained work permits in the early 2000s, studied nursing at City College of San Francisco and Holy Names University in Oakland, and worked night shifts as a nurse’s assistant to support her family. In 2015, she landed a six-figure job as an oncology nurse at Highland Hospital.

The couple had been applying for legal status since 2002, but suffered a setback in 2013 when an immigration judge ordered them deported. President Barack Obama’s administration, however, granted them two one-year stays, then adopted rules that focused on deporting criminals and allowed the couple to remain in the U.S., renewing their work permits every six months.

That ended when President Trump took office and signed an executive order calling for across-the-board deportations. Seven months later, Mendoza-Sanchez and her husband were sent back to Mexico. They left behind three daughters, two of them native-born U.S. citizens and the oldest, Vianney, who was an infant when her mother brought her to California in 1994. Vianney is now protected from deportation under the Deferred Action for Childhood Arrivals program, or DACA, which Trump is trying to repeal.

The couple at first brought their son, Jesus, then 12, to live with them in the village where Mendoza-Sanchez had been born and raised. Two months later, his mother said, the unfamiliar surroundings, language and school system were too much for him, and she sent him back to Oakland.

Workers whose jobs require specialized knowledge, like Mendoza-Sanchez, are theoretically eligible to seek H-1B visas, allowing them to return to the U.S. for renewable three-year periods. There are more applicants than visas available, so this spring she entered the visa lottery, and was one of about 65,000, out of 200,000 applicants, to draw a winning ticket.

She was still ineligible for a visa through normal channels, because she had entered the U.S. illegally with her daughter in 1994 — technically “alien smuggling,” Becker said. So she applied for a waiver available to skilled workers.

U.S. Citizenship and Immigration Services found her legally eligible. Then she traveled to the State Department’s consular office in Mexico City for an interview, accompanied by a legal team that presented written testimonials to her skills, character, and the need for her services, along with the media coverage of her case. The office recommended approval.

The final, nerve-racking step was back at Citizenship and Immigration Services, an arm of the Department of Homeland Security, which has been at the forefront of Trump’s border crackdown. But on Friday morning, her phone rang with good news.

”It’s been a very tough year, the first year we were not together,” said Mendoza-Sanchez, who has been visited by two of her children and talks with them regularly, but too briefly, by phone. She said she was amazed at her support, including “thousands of people who signed the petition” in support of a bill Feinstein introduced last year calling for her return. The bill did not pass.

After the holidays, she said, she’ll go back to work at the hospital, then provide evidence to immigration officials that she has secure employment and could support her husband, making him potentially eligible for a visa.

“This journey hasn’t been easy,” Mendoza-Sanchez said. ”But we’ve been blessed.”

Bob Egelko is a San Francisco Chronicle staff writer. Email: begelko@sfchronicle.com Twitter: @BobEgelko