Twenty-three male workers at a university in Wales who were paid less than their female counterparts have won around £500,000 in compensation after suing for sex discrimination.

Eighteen caretakers and tradesmen took the University of Wales, Trinity St David (UWTSD) to an employment tribunal claiming they were paid less than women on the same pay grade, including secretaries and office workers.

The university's legal team told a hearing in Cardiff that they would no longer be contesting the claim and agreed to pay out to the claimants and five more men on the same pay grade.

UWTSD had initially argued that the pay difference was not due to gender but because of changes to the men's contracts.

Peter Wallington QC, representing the university, said: "In light of the evidence that was agreed this morning, I have taken some further instructions from the respondents who concede the [claims of] equal pay was well founded."

Paul Doran, the men's solicitor, said he expected his clients to share a £500,000 payout – less than the £736,000 they were originally demanding, "as there are a few matters such as interest and the right to an award for 'injury to feelings' that have been revised in the last couple of days."

He welcomed the university's decision to drop the case. "I'm absolutely delighted for my clients … While it is disappointing that they were required to take it all the way to tribunal to get such an admission, the acknowledgment that they were right all along will be just as enjoyable as the compensation that they will receive."

His clients are thought to be the biggest group of men to have launched legal action in Britain claiming sex discrimination. All were originally employed by Swansea Metropolitan University, which merged with UWTSD in August last year.

Rob Cooze, 50, a tradesman from Swansea, said he and his colleagues were elated. "With all due respect to our new employers, Trinity St David, this is completely new to them and is a historical issue. I just hope it hasn't soured any relations between us," he said.

A university spokesman said: "We came to the view the original claim presented by staff to the former Swansea Metropolitan University had due merit and, as a result, an appropriate remedy should be agreed and actioned.

"The employment tribunal related to events that occurred more than seven years ago at the now dissolved higher education corporation Swansea Metropolitan University and several years before its merger with the University of Wales Trinity Saint David, which took place in 2013.

"The University of Wales Trinity Saint David had no involvement in the decisions that were made by Swansea Metropolitan University in 2007. This was a complex case and we are very disappointed the new university now has to deal with, in an appropriate manner and with due care, the consequences of historical decisions."