For more than 100 years the Metropolitan Republican Club has been a chummy watering hole for the city’s GOP elite, but in recent months the Upper East Side institution has been shaken by scandal, stung by a bitterly-divided board of directors and shunned by state party brass.

In February, Ian Walsh Reilly was voted in as president in a divisive election.

“Ian is not the archetype of someone who is president of Metropolitan Republican Club: he’s a professional doorman … it’s a little bit weird,” said one member.

“He’s incompetent,” said another.

The contest was a mirror image of the larger civil war within the Republican Party, with the 40-year-old Reilly accusing his 67-year-old opponent, Robert Morgan Sr., of being insufficiently loyal to Donald Trump.

Some members believe Reilly snatched the job by taking advantage of a quirk in the election rules that allows any club member to vote. Weeks before the election, far-right provocateur Milo Yiannopoulos backed Reilly on Facebook and urged his millions of fans to pay the $75 membership fee to cast their vote for him.

“There was nothing stopping them from buying memberships for one another. One person’s card bought like six memberships,” said a board member. “If it weren’t for the alt-right … I am pretty confident he would not have won that race.”

Two longtime board members resigned in disgust.

Founded in 1902, the group has counted Theodore Roosevelt and Nelson Rockefeller among its members and serves as a regular stop for high-profile Republicans like Newt Gingrich and Tucker Carlson.

Reilly, who spent four years as chairman of the group’s executive committee, is no stranger to controversy. In October, he booked an appearance by Gavin McInnes, founder of the far-right Proud Boys. Later that evening members of the group sparred with Antifa protesters outside the building. The scuffle resulted in multiple arrests and made national news.

Reilly has also taken heat for building ties to far-right groups abroad, including the ultranationalist political party “Alternative for Germany,” which has downplayed Holocaust remembrance.

The criticism has not gone unnoticed by the club president, who just this week filed a $5.5 million defamation suit against Democratic State Senator Andrew Gounardes for “falsely accusing [Reilly] of being a member of the Proud Boys.”

Reilly did not respond to multiple inquiries from The Post, but he also has defenders.

“Ian Reilly has worked his ass off,” board member Pete Holmberg, who had endorsed Reilly’s opponent, said. “There aren’t enough Republicans in this town for us to hate each other. We cannot afford the luxury of undermining each other.”

The cascading controversies may have been too much for state party leaders.

The New York State Republican Party — which had long maintained office space in the club’s East 83rd Street townhouse — discontinued its lease in September and relocated to the Women’s National Republican Club in Midtown. A rep said the party moved for better amenities.