BRUSSELS, June 16 (Reuters) - The sale of illegally harvested timber and timber products will be banned throughout the European Union from late 2012 under an informal deal struck by EU lawmakers and seen by Reuters.

Environmental campaigners on Wednesday said the agreement would help stop companies profiting from forest destruction and close the door to illegal timber imports into Europe, the world's largest market for wood products.

The new rules were agreed by negotiators from the European Parliament, the Spanish EU presidency and the EU's executive European Commission, and must still be rubber-stamped by EU governments and the full parliament before they enter force.

The ban covers raw timber and timber products such as furniture, casks and floorboards, though printed materials such as books will be exempt for at least five years, according to the agreement.

Companies will have to carry out due diligence and risk assessments to ensure that any timber was legally logged, and those that break the rules will face fines and trading bans.

Environmental group Greenpeace said the deal was backed by a significant majority of EU countries, with only a handful led by Sweden and Portugal opposed.

"With this law, the black economy for wood products in Europe will be closed for business, levelling the playing field so companies are better able to act sustainably," Greenpeace forest policy director Sebastien Risso said.

Last year environmental groups estimated that Europe buys 1.2 billion euros ($1.48 billion) worth of illegally felled timber a year, about 20 percent of its imports.

Greenpeace said illegal logging accounted for up to 90 percent of all timber harvested in Indonesia, over 60 percent in the Brazilian Amazon, and up to half harvested in Cameroon between 1999 and 2004.

The parliament is expected to approve the deal in early July, and once EU governments have rubber-stamped them, the new rules will enter force in late 2012.