KUALA LUMPUR (Reuters) - Two police officers were killed and another was injured in Malaysia's Johor state on Friday morning, when they were attacked by a man suspected of being a member of the Al Qaeda-linked militant group Jemaah Islamiah (JI), officials said.

JI is a militant group seeking to establish an Islamic caliphate in Southeast Asia.

Malaysia's Inspector-General of Police Razarudin Husain said the suspect entered a police station in Johor's Ulu Tiram town shortly after 2 a.m. (1800 GMT Thursday) wearing a mask and armed with a machete.

A police constable approached the suspect, who killed the officer with the machete and seized his pistol. A firefight ensued leading to the death of a second officer and injuring a third, Razarudin told a televised press conference.

The suspect was also killed in the shootout, Razarudin said.

The suspect, son of a known JI member, had no prior criminal records, he said.

"We believe he came to steal firearms from the police for his own agenda that we have not yet determined."

Police have arrested seven people in connection with the attack, including five members of the attacker's family.

Reuters was unable to contact those detained or their legal representatives.

Razarudin said he had also ordered investigations of all JI members in the state, adding that police have identified more than 20 living in Johor.

JI is accused of orchestrating some of the deadliest militant attacks in neighbouring Indonesia, including the 2002 bombings of Bali nightclubs that killed more than 200 people. Some of JI's senior leaders have been known to use Malaysia as an operational base.

Muslim-majority Malaysia has detained hundreds of people for suspected militant activities since a 2016 attack in the capital Kuala Lumpur linked to the Islamic State. Arrests have largely abated in recent years following a regional crackdown.

(Reporting by Rozanna Latiff; Editing by Tom Hogue)