MONTREAL - Spammers of the world, beware.

A Quebec man has been ordered to pay Facebook $1 billion after he allegedly bombarded its members with junk messages.

Quebec Superior Court has upheld a ruling by a U.S. court that Montrealer Adam Guerbuez owes that money after he flooded the Facebook accounts of members with 4 million spam messages.

A court in California ruled in 2008 that Guerbuez had violated U.S. electronic commerce laws.

Justice Lucie Fournier also forbade Guerbuez from having a Facebook account or being involved in any way with the social-networking site.

The spam sent by Guerbuez promoted medication to treat such conditions as erectile dysfunction.