A 1982 attempt to import a consignment of sex dolls into Britain had the unintended consequence of ending the law against importing "obscene or indecent" items that were not illegal to sell within the UK. Having had the dolls seized by Her Majesty's Customs and Excise officers, David Sullivan's Conegate Ltd. took the case all the way to the European Court of Justice, and won in 1987. Britain was forced to lift its stringent import prohibitions dating from 1876 because for imports from within the European Community they constituted a barrier to free trade under the terms of the Treaty of Rome.