Tunis (AFP) - Six members of Tunisia's security forces were killed Sunday in a "terrorist attack" near the border with Algeria, the interior ministry said, the country's deadliest such incident in over two years.

A national guard border patrol in the Ain Sultan area of the Jenduba border province "was hit in a landmine ambush that killed six agents" at 11:45 am (1045 GMT), the ministry said in a statement.

Ministry spokesman General Sufyan al-Zaq said the blast was a "terrorist attack" and that assailants had "opened fire on security forces" after the mine exploded.

"Combing operations" were underway, said Zaq, who had earlier told AFP that eight guards were killed in the attack.

No group has claimed the attack, which took place in a mountainous border area where the Al-Qaeda-linked Okba Ibn Nafaa Battalion and the Tunisian branch of the Islamic State group, Jund al-Khilafa (Soldiers of the Caliphate), are active.

Sunday's assault marks the first major attack in Tunisia since a March 2016 attack on security installations in the town of Ben Guerdane on the Libyan border.

That attack killed 13 security forces and seven civilians.

The latest incident comes as Tunisia is targeting its best tourist season since visitor numbers plummeted in the wake of a string of deadly jihadist attacks in 2015.

Tunisia's tourism industry was devastated by those attacks, which included one at the National Bardo museum in Tunis and another targeting a beach resort in Sousse that together killed 59 foreign tourists and a Tunisian guard.

In May, Tourism Minister Selma Elloumi Rekik said the industry had made a "real recovery".

"People are coming back to Tunisia because there is security ... we are at the same level (of security) as any European city," she said.

Since the 2011 uprising that toppled dictator Zine El Abidine Ben Ali, jihadist attacks in Tunisia have killed dozens of members of the security forces and foreign tourists.

Since Ben Ali's fall, "at least 127 militants and 118 soldiers, national guardsmen, and police officers have been killed in the northwest", according to figures compiled by analyst Matt Herbert and published in June by the Carnegie Endownment for International Peace.

"This new attack shows that there are still pockets where security problems have not been solved," he told AFP on Sunday, while stressing "the vast majority of Tunisia remains safe".

The country has been under a state of emergency since November 2015, when an IS-claimed suicide bombing in Tunis killed 12 presidential guards.