LOS ANGELES, Oct 16 (Reuters) - Former Vice President Joe Biden won a TV ratings battle with President Donald Trump as the two held competing town halls with voters just weeks ahead of the Nov. 3 election, according to Nielsen ratings data released on Friday.

Biden averaged 15.1 million viewers during Thursday night's 90-minute discussion on Walt Disney Co's ABC broadcast network. Trump pulled in 13.5 million for his 60-minute event across Comcast Corp's broadcaster NBC and the company's MSNBC and CNBC cable channels.

For the one-hour period that both Trump and Biden were on the air, Biden averaged 14.3 million to Trump's 13.5 million.

The primetime town halls were scheduled after cancellation of a debate that had been set for the same time. Trump pulled out of the debate after it was changed to a virtual format.

During his event on ABC, Biden attacked Trump's handling of the coronavirus pandemic. On NBC, Trump defended his administration's response to the virus and his own personal conduct.

NBC was criticized for scheduling Trump opposite Biden after ABC had already set its event, forcing voters to choose which candidate to watch live. Trump often brags about the size of his television audiences.

In some markets, the events did not compete directly. In Los Angeles, for example, ABC aired the Biden event live at 5 p.m. Pacific while NBC broadcast a recording of Trump at 8 p.m. Pacific.

Nielsen's figures reflect people who watched on television and do not include others who streamed the events via digital platforms, which are growing in popularity.

The combined audience - 27.6 million - came in much lower than the massive viewership for the first debate between Trump and Biden. That Sept. 29 matchup attracted 73.1 million people across 16 networks.

A second debate between Trump and Biden is scheduled for Thursday.

(Reporting by Lisa Richwine; Editing by Aurora Ellis Editing by Chizu Nomiyama and David Gregorio)