The Sun cited data from ComScore that showed it had 25.4 million monthly users in January – a 16% rise month on month – ahead of the Daily Mirror’s 23.8 million.
MailOnline remains the most popular online newspaper site with 29.3 million users but The Sun claims to have closed the gap to 4 million from 10 million in a year.
Tony Gallagher, the editor-in-chief of The Sun, said the paper’s online growth has been fuelled by mobile usage, with 91% of traffic coming from smartphones and other mobile devices.
The Sun has 23 million monthly users on mobile – only just behind MailOnline’s 23.2 million.
Gallagher said: "The Sun Online has had a remarkable 12 months, rising from one of the least-read national newspapers online to now the second most-read overall.
"We are especially pleased with our brilliant figures for mobile audience and that much of our growth has come from readers in the UK.
"This exceptional achievement demonstrates the enduring power of The Sun brand in paper and online."
He added: "It is a huge tribute to our staff that the Daily Mirror is trailing in our wake."
However, a spokesman for Trinity Mirror strongly disputed the figures, claiming they did not offer a fair like-for-like comparison, and maintained it is still ahead of The Sun.
"The Sun has inflated their figure by including readership numbers from other sites including DreamTeamFC.com and Club950.co.uk," the Trinity Mirror spokesman said.
"On a like for like basis, Mirror Online remains comfortably ahead of Sun Online, and by a healthy margin.
"The Sun has just thrown everything in together to inflate their number vs actual Sun traffic."
A source close to the Daily Mirror said it looked at its digital reach across Trinity Mirror Solutions’ portfolio of titles, which gives it about 30 million monthly users.
This observer added that it was encouraging to see how dominant newspapers are in the most-viewed news sites, but disappointing how they generate relatively little digital ad revenue as money has been flowing to the big tech platforms.
Rebekah Brooks, the chief executive of News UK, dropped The Sun’s paywall in November 2015 – two years after The Sun launched a £2-a-week charge for users – because audiences were low.
The Sun, Britain’s biggest-selling print newspaper, feared its influence could be diminishing.
ComScore’s figures showed The Guardian has 22.7 million monthly users, the online-only Independent and the Evening Standard a combined 22 million, and The Telegraph 20 million, according to data provided by The Sun.
Editing note: Campaign updated this news story after it was originally published, to add comments from Trinity Mirror's spokesman