BIRMINGHAM, Ala. (AP) _ An illegal alien has no legal claim against a motel that paid him less than minimum wage, a judge said in a ruling that the worker's attorney predicted would affect labor laws for non-aliens as well.

U.S. District Judge William Acker said that to enforce minimum wage and overtime provisions in favor of Rajni Patel, an Indian attorney who remained in the United States after a six-week visitor's visa expired in 1982, would be in direct conflict with immigration policy and congressional intent.

''Patel necessarily understands the illegality of his presence within this country. He is here because he can make more money working as a laborer below minimum wage in a motel in the United States than he can practicing law in India,'' Acker wrote.

''It is clear that Patel is challenging the ability of this country to enforce its own immigration laws.''

In his written opinion, filed last month and reported in The Birmingham News on Wednesday, Acker said that to allow the illegal alien to profit from the Fair Labor Standards Act would be ''to help him perform a fraud upon the American labor force.''

George Boles, a Birmingham attorney representing Patel, has appealed the decision to the 11th U.S. Circuit Court of Appeals in Atlanta. A worker in Boles' office Wednesday said no hearing date had been set.

Boles said that based on the interest that has been shown in Acker's ruling, it could have national impact on labor laws generally, not just in cases involving aliens.

A government lawyer involved in the case said Wednesday the Labor Department will oppose Acker's position before the 11th Circuit. The department filed briefs in Patel's case contending that illegal aliens could invoke federal labor laws.

Court records show that Patel came to the United States in 1982 on a visa that expired after six weeks. He moved to Birmingham in 1983 and worked for less than minimum wage at Quality Inn South before leaving town in late 1985.

Last August, Patel filed the federal court action against Sumani Corp., operator of the motel, and Manibhai Patel and Dilip Patel, majority stockholders who claimed no kinship with Patel.

In response to the suit, the stockholders said Rajni Patel did not work for them but they let him stay at the motel as a favor to a relative and to hide him from immigration officials.

The corporation said Patel did some work as an independent contractor so minimum wage was not a factor. The corporation also said that as an illegal alien, Patel had no claim under the Fair Labor Standards Act, an argument with which Acker agreed.

Boles said Patel is now living in Florida, but would not specify where. He said his client was still an illegal alien but was not under deportation proceedings.