You didn't provide any information about your empire (number of colonies, for example), so I can't make a good assessment of your chances or possible actions.
What you definitely could have done was to bribe the Altarians to declare war on all the other races. This should have been relatively cheap, because the other races had no or only a small military. It would have also given you the chance to crank up the research, while the Altarians were preoccupied. The Planetary Invasion techs, better weapons and defenses were especially important in this situation.
Another small trick is to use empty hulls to protect your planets from invasion. They are cheap to build (depending on hull size) and cost no maintenance, so you can build them fast and in large quantities without repercussions. This works even better, if you don't have the Orbital Command Center. The AI would then need to destroy the hulls one by one, wasting movement points for each attack. Depending on the amount of enemy fleets in the area, this could make your planets impenetrable to invasion.
There were probably other possible actions as well, but without more information it is hard to say. Still, sometimes a situation really is un-winnable. I'm far from an expert, so those situations are more common in my games than I'd like.