A squadron commander in the Chinese air force flew his Mig-19 jet fighter to Taiwan today and asked for political asylum, a spokesman for the Defense Ministry here announced.

Military sources identified the defector as Fan Yuan-yen, 41, who said he was squadron leader of the 2d Independent Command of the Chinese air force, a reconnaissance unit stationed at Chuan-chou, Fukien Province.

Hurling his red-star-adorned cap to the ground. Fan jumped from the cockpit and the sources said, told a groupd of cheering air force officers who surged to welcome him Comrades it's the Communists who forced me to do this. I just cannot take it any more.

"I came here to seek freedom and human rights which are totally lacking on the China mainland."

Fan reportedly said that te Chinese mainland under Communist rule is "a big mess" and that some people are starving. He said that he was "very sad" about leaving his two daughters and one son but added that he hoped to get them out to join him in Taiwan someday.

Fan is expected to be rewarded with Taiwan's standing offer of 5,000 ounces of gold - currently worth about $750,000 - for Communist air force detectors.

Air Force officials indicated that Fan brought along documents connected with air defense plans on the mainland and with the general military situation in the coastal area from which he came.

News of Fan's defection came as celebrations were held throughout the island marking the 40th anniversary of the Chinese-Japanese war. Fire-crackers crackled in the afternoon and Taiwanese cheered in the streets as hand-written notices and printed extras of newspapers carrying reports of the defection were distributed.

Premier Chiang Ching-kuo praised Fan's defection as a brave act. A television commentator said Fan's decision proves to President Carter that the existence of Taiwan is the only hope for the people on the mainland who desire freedom.

Most pedestrians and government officials interviewed said the defection was proof that Carter's plan to accelerate U.S. normalization of relations with China was wrong.

[In Washington a State Department spokesman said the incident "does not involve the United States in any way. We have no intention of getting involved.]

The defense ministry said Fan was being debriefed by air force officials. An official announcement said the defecting pilot was "safe and sound" and that his MIG-19, backbone of the Chinese air force, was in "eperfect shape."

Military sources said that Fan was leading a formation of planes on a patrol mission along the coast of the Taiwan Strait when he suddenly veered east to fly over the strait - an area dominated by Taiwanese fighter planes where Communist planes seldom venture.

The events that followed, sources said, nearly triggered the first dog fight between the Communists and the Taiwanese in 18 years.

Within seconds Fan, an officer whose rank is equivalent to at least a major, radioed signals to the Taiwan air force that he wanted to defect. The signals have been broadcast daily for the past 15 years by Taiwan calling on Chinese pilots to defect.

The other Migs immediately gave chase to their leader in an apparent attempt to head him off.

Taiwan officials, upon receiving Fan's signals, radioed their own jets in the ares to protect the defecting Mig.

When the other Migs saw Taiwan's fighters on the horizon, they turned and flew back into Chinese air space only seconds before they would have been engaged in a dogfight, sources said.

The last such air battle over the Taiwan Strait occurred in 1959 when the Communists also shelled the offshore islands of Quemoy and Matsu.

The Mig-19 was the fourth plane of China's People's Liberation Air Force flown to Taiwan by a defecting pilot.