DUBAI (Reuters) - Saudi security forces killed a suspected Islamic State militant when he pulled a gun on a patrol in the capital Riyadh, the Interior Ministry said on Wednesday.

The patrol was trying to check a complaint on Tuesday evening that a resident of a flat in the capital's al-Rayyan district had joined Islamic State.

"When security men tried to arrest him, he initiated resistance and pulled a gun and it became necessary to deal with him and neutralize him, which led to his death," the ministry said in a statement carried by state news agency SPA.

A companion of the dead man was arrested and found to be in possession of a weapon, it said.

The hardline Sunni militant group has carried out a series of bombings and shootings in Saudi Arabia since mid-2014 that have killed scores of people, mostly members of the Shi'ite Muslim minority and security forces.

The militant group, bitterly opposed to Gulf Arab rulers, is trying to stir sectarian confrontation on the Arabian peninsula to bring about the overthrow of the states' ruling dynasties.

In a separate incident, a policeman was shot and killed by unidentified assailants in Tarout Island in eastern Saudi Arabia, an area where many of the Sunni Muslim country's Shi'ite minority live, according to another interior ministry statement.

Shi'ites in eastern Saudi Arabia complain of discrimination, which they say prevents them from gaining good government jobs and deprives them from state investment in their neighborhoods. The Saudi government denies such charges.

(Reporting by Sami Aboudi, Editing by Angus MacSwan)