Image copyright Reuters Image caption Protesters clashed with police outside parliament in Jakarta

Police have fired tear gas and water cannons at protesters demonstrating outside the Indonesian parliament over a proposed new criminal code that would ban sex before marriage.

Protests against the bill also took place in other cities in the country.

The bill would outlaw most abortions and make insulting the president illegal.

The bill has been delayed, but protesters are concerned it could still eventually pass through parliament.

What's in the controversial bill?

The proposed new criminal code includes the following:

Sex before marriage would be criminalised and could result in a one-year prison term

Living together outside marriage could lead to a six-month prison sentence

Insulting the president, vice president, religion, state institutions and symbols such as the flag and national anthem would be illegal

Abortion would carry a maximum four-year prison term if there were no circumstances of a medical emergency or rape

The bill was initially scheduled for a vote on Tuesday - however, President Joko Widodo postponed the vote on Friday, saying new laws needed more consideration.

Why are people protesting?

Despite the delay, many Indonesians are concerned that the bill could still be pushed through parliament.

Image copyright Reuters Image caption Police were pelted with rocks and retaliated with tear gas

There is also anger over the passing of a new law that has weakened the Corruption Eradication Commission, an important arm in rooting out corruption.

What happened on Tuesday?

Thousands of protesters, many of them students, took to the streets in cities across Indonesia.

The main clashes took place in the capital Jakarta as demonstrators demanded to meet parliament Speaker Bambang Soesatyo.

Protesters pelted police with rocks, who responded with tear gas and water cannons.

Image copyright AFP Image caption Students tend their injured friends during protests in Jakarta

One placard held by a woman said: "My crotch does not belong to the government".

Protests in other areas, including Yogyakarta and Makassar on Sulawesi island, continued for a second day.

"We're going to parliament to oppose the new law for the anti-corruption agency that are not pro-people but are pro-corruptors," Fuad Wahyudin, 21-year-old student from an Islamic university in West Java, told Reuters.

More than 5,000 police have reportedly been deployed to maintain security in Jakarta.