His plane tickets were booked. His bags were packed. His once-in-a-lifetime opportunity was days away. And then, all of a sudden, Jim Nieto got the call.

Nieto, a longtime martial arts coach at the Santa Monica YMCA, for months has been helping a young local woman train for a chance to represent Saudi Arabia in judo in the 2016 Olympic Games in Rio de Janeiro.

But when he received a phone call last week from a liaison with that country’s Olympic committee, he was told that his services were no longer needed and that he would not be accompanying Joud Fahmy to Brazil.

“I’m so disappointed,” he said. “They pulled the rug out from underneath me.”

Because he wasn’t given an explicit reason, Nieto has tried to come up with possible explanations for his exclusion from the Saudi contingent. He is not of Saudi descent, for example, and doesn’t have any connections to the Middle Eastern nation.

But he also believes Saudi officials don’t like the publicity they have received regarding the participation of female athletes in the Olympics. (The Daily Press has published two articles on the matter over the last nine months: one in October about Fahmy’s chances of making it to Rio and another in April about Nieto’s tour of the host city.)

Fahmy, 22, is still expected to compete in the Olympics, joining track and field entrants Sarah Attar and Cariman Abu al-Jadail and fencer Lubna al-Omair as the only women on the Saudi team. They make up the largest female Olympic contingent in the history of the nation, which had never been represented by women until it succumbed to international pressure ahead of the 2012 Games in London.

Nieto said his snub follows months of unreliable correspondence with Saudi officials and overall disorganization on the part of the country’s Olympic committee.

“They can’t even say they fired me because they never hired me,” he said. “They communicated with me so little.”

Nieto took an interest in Fahmy, the daughter of a diplomat, when she arrived in Santa Monica well over a year ago. She lacked extensive judo experience and a rigorous training background but repeatedly showed signs of her athletic talent and intense work ethic. And Nieto knew that she could potentially qualify for the Olympics because of her affiliation with Saudi Arabia.

Things were looking good for Nieto when he was invited to tour Rio a few months before the 2016 Games, which will begin Friday with opening ceremonies. At that point, he said Fahmy was still a beginner but that she had improved significantly in just six months.

Fahmy has been spending time in Florida to train ahead of the Olympics, and her communication with Nieto has all but ceased. The local coach was hoping to provide guidance for Fahmy, who lacks the international experience that her Olympic opponents have in spades.

“It would be like somebody who was pitching on a farm all of a sudden going to the World Series,” Nieto said. “She needs someone who knows her psyche.”

Nieto had already received several vaccinations and taken care of other logistics when he heard the news that he wouldn’t be making the trip to Rio. He still plans to watch the opening ceremonies as Fahmy and her fellow Saudi representatives enter the arena, but he wishes he could be at her side.

“They had asked for my jacket size, my pant size, my shoe size,” he said. “Obviously, I won’t be there. … I’m flabbergasted. They won’t explain to me. Who did I step on? I just don’t know.”

As for how Fahmy will do on the world’s biggest athletic stage?

“She’ll try her best,” Nieto said.