A former Turkish military chief says the government was warned about U.S.-based Muslim cleric Fethullah Gulen's movement back in 2004 but no action was taken against the group.

The government accuses Gulen — a former ally of President Recep Tayyip Erdogan who later turned into his number one foe — of being behind the failed military coup attempt in July and has embarked on a massive crackdown against his followers.

Retired Gen. Hilmi Ozkok on Wednesday told a parliamentary committee investigating the coup that Erdogan's government was warned about Gulen's network during a National Security Council meeting in 2004.

Ozkok told the committee an action plan was drawn up to tackle the movement, "But when we followed it up . we saw that nothing much was done."