What's the max prestige for Gym?

The intended maximum prestige appears to be 50,000, since 10 is the maximum level. However, being that this is Niantic Labs that we are talking about, there appears to be a related bug.

As noted in the answer here, the maximum prestige of a gym should be 68,000. The likelihood of ever finding an instance of this is probably very low, but it should be theoretically possible.


EDIT:

As stated in my answer here, the maximum prestige is actually capped at 50k. The maximum it will display is still 68k/50k, but even at that "level", if the first Pokemon is defeated, 18000 prestige will be removed plus the prestige removed for defeating a Pokemon.

So, while you are able to make a gym appear to have up to 68k/50k prestige, the game will not recognize prestige over 50k, and will behave accordingly.