CAIRO, July 16 (Reuters) - Egypt's cabinet has amended a draft counter-terrorism law so that journalists would be fined, rather than jailed, for contradicting the authorities' version of any terrorist attack, the state news agency reported.

The bill, which sets up new courts for terrorism trials, was proposed after Egypt's top prosecutor died in a car bombing and 17 members of the security forces were killed by Islamist insurgents in the Sinai.

It has been condemned by rights groups, with Amnesty International saying it would grant President Abdel Fattah al-Sisi "absolute powers" to crush dissent.

One provision of the bill would have made it a criminal offence for journalists or others to report on terrorist attacks in a way that contradicted the official version of events, with jail terms of at least two years.

The cabinet spokesman told state news agency MENA that the article had been amended to replace the jail time with a fine of 200,000-500,000 Egyptian pounds ($25,000-$65,000).

Human rights groups have accused Egyptian authorities of widespread violations since the army toppled Islamist President Mohamed Mursi in 2013 after mass protests against his rule, and say the government has rolled back freedoms won in the 2011 uprising that toppled veteran autocrat Hosni Mubarak.

The government says it is protecting the country from Islamists, including Mursi's Muslim Brotherhood and militants associated with Islamic State, active in North Sinai, both of which it classes as terrorist groups.

Rights groups say Egyptian prisons hold 40,000 political detainees.

($1 = 7.8300 Egyptian pounds) (Reporting by Eric Knecht; Editing by Michael Georgy and Robin Pomeroy)

Our Standards: The Thomson Reuters Trust Principles.