Washington: Democrat and former Marine Conor Lamb has scored a razor-thin but extraordinary upset in a special House of Representatives election in the heart of President Donald Trump's Rust Belt base.

The in south-western Pennsylvania victory still may be contested, but Lamb's 627-vote lead on Wednesday afternoon appeared insurmountable, up-ending the American political landscape ahead of November's midterm elections.

The result – a 20 per cent swing against the Republicans since the 2016 election – will embolden fellow Democrats to run maverick campaigns even in deep-red areas where Republicans remain bedevilled by Trump's deep unpopularity.

Lamb raised and spent significantly more on the election on his own account than the Republican candidate, Rick Saccone, a Republican state legislator. However, outside conservative groups swamped the spending of either individual. Between conservative super PACs and the National Republican Congressional Committee, Saccone had more than $14 million spent on his behalf in the campaign. Lamb got just over $2 million.