Image caption Batman first appeared in Detective Comics in May 1939

A "jaw dropping" collection of early comic books has sold for $3.5m (£2.2m) at auction in New York.

The trove of 345 comics had been bought by the late Billy Wright from Virginia when he was a boy.

A copy of Detective Comics No. 27, which sold for 10 cents in 1939 and featured Batman's debut, got the top bid on Wednesday - raising $523,000.

The collection was found last year when a relative of Mr Wright was clearing a basement in his house.

"This really has its place in the history of great comic book collections," said Lon Allen, managing director of comics for Heritage Auctions, which was overseeing the sale.

He described the trove as "jaw-dropping", adding that Mr Wright seemed to have a knack of buying the right comics at the right time.

Another book - Action Comics No. 1 from 1938 featuring the first appearance of Superman - fetched $299,000.

This remarkable collection might never have seen the light of day - as Mr Wright never mentioned it to his family when he was alive, the BBC's Jonathan Blake in Washington reports.

The neatly stacked comics - all in good condition - lay untouched in his home in Martinsville for 17 years.

Experts say the collection is all the more valuable and significant because the books were kept by a man who bought them as a boy.