ST. GEORGE'S, Grenada — Legislators in Grenada have approved a bill that makes it a crime to offend people through websites such as Facebook and Twitter.

The measure was approved as part of an electronic crimes bill passed late Friday in the tiny eastern Caribbean island.

According to the bill, a complaint about offensive online activity would be filed with police. A judge would then decide if the message was offensive.

The bill also makes it a crime to distribute child pornography, imposing fines of up to $111,000 and a maximum prison sentence of 20 years.

The legislation imposes penalties on other online activities such as electronic stalking and identity theft.