A US customs agent has been sentenced to 30 days of house arrest for failing to inspect ship.

Carl James Jr was also ordered to complete 200 hours of community service.

The Virginian-Pilot website cited court documents as saying James, 38, was the only agricultural specialist working at Virginia International Gateway in Portsmouth.

He was tasked with checking for invasive species or diseases.