The male members of the Brisbane Tattersall’s club have narrowly voted to scrap a 153-year-old rule banning women from joining.

The club is one of Australia’s last remaining men-only establishments. The proposed rule change had provoked a bitter debate among members, many of whom had lobbied for the hyper-masculine status quo.

The final vote tally was 1,405 in favour, 1,368 against. There were more than 200 informal votes.

A website and Twitter account that had allowed members to share their anonymous and overtly sexist views were both taken down late on Wednesday afternoon.

Women had been allowed to enter most areas of the club on a “partner card” but not to join.

Members had previously voted against the same change but in recent years focus on the policy had increased.

The Liberal National party was widely criticised for holding an International Women’s Day breakfast at Tattersall’s.

The club usually bestows honorary membership on political, business and sporting leaders. But the Annastacia Palaszczuk-led Labor government in Queensland, which is led by two women and has a majority of women in cabinet, has snubbed the venue.

“Tattersall’s should open its doors,” Palaszczuk said in 2016. “Until they change their policy, my ministers won’t be attending functions there.”

The month-long postal vote process had become increasingly nasty. Prominent club members, including a newly appointed supreme court justice, signed a letter attempting to change the club’s voting rules before the verdict on allowing women members.

The club’s current president, Stuart Fraser, is an Liberal National party backroom figure and the party’s treasurer. In a recent video message to members, Fraser said the club needed to address its falling patronage. It has debts of about $10m.

“We started this conversation because many of you were coming in less, and we wanted to know why,” Fraser said in the message to members. “You told us that the financial security of our club was the most important thing to you and you told us increasing patronage should be our focus.

“A yes vote will return this club to a busy social space and a respected member of our community.

“We have all witnessed with great disappointment a small, vocal and anonymous group acting free of scrutiny of their motivations and short on truth.”