DUBAI (Reuters) - Qatar, a major supporter of rebels in Syria's civil war, suggested it could intervene militarily following Russia's intervention in support of President Bashar al-Assad but said it still preferred a political solution to the crisis.

The comments by Qatar's foreign minister, made in a CNN interview on Wednesday, drew a swift reply from Assad's government with a senior official warning that Damascus would respond harshly to such "direct aggression".

Gulf Arab backers of Syrian rebels such as Qatar have been unsettled by Russia's three-week-old air strike campaign that has allowed Assad's forces to wrest back some territory to help secure his strongholds in western Syria.

Qatar has been a leading supporter of anti-Assad rebel groups, providing arms and financial and political backing.

Asked by CNN if Qatar supported the Saudi position that does not rule out a military option in Syria as a result of Russia's intervention, Foreign Minister Khalid al-Attiyah said:

“Anything that protects the Syrian people and Syria from partition, we will not spare any effort to carry it out with our Saudi and Turkish brothers, no matter what this is.

"If a military intervention will protect the Syrian people from the brutality of the regime, we will do it,” he added, according to a text in Arabic carried by Qatar's state news agency QNA.

His comments were also carried on CNN's Arabic website.

In response, Syrian Deputy Foreign Minister Faisal Mekdad was quoted by Lebanon-based al-Mayadeen television as saying: "If Qatar carries out its threat to militarily intervene in Syria, then we will consider this a direct aggression ... Our response will be very harsh."

Attiyah also said Qatar preferred to solve regional crises through direct political dialogue.

“We do not fear any confrontation, and thus we will call for dialogue from a position of strength because we believe in peace and the shortest path to peace is through direct dialogue.”

Qatar is a small but wealthy gas exporter that played a major role in supporting Islamist opposition groups during Arab Spring uprisings in 2011 in Libya and Syria.

(Reporting by Omar Fahmy in Cairo, Katie Paul in Dubai and Mariam Karouny in Beirut, writing by Sami Aboudi, Editing by William Maclean and Mark Heinrich)