CHEYENNE, Wyo. (AP) _ Wyoming on Friday becomes the last state to raise its drinking age to 21, confronting bar owners with a dilemma - what to do about 19- and 20-year-olds who come in legally Thursday night and suddenly become too young to drink.

The Legislature earlier this year acceded to federal pressure to raise the drinking age from 19 to 21. The increase takes effect at 12:01 a.m. Friday.

But state law allows bars to remain open until 2 a.m., and 19-and 20-year- olds expected to turn out in force Thursday night for their last chance for a legal drink.

''It takes effect at 12:01 a.m. July 1 and from that point on, a bar operator cannot sell to or allow someone 19 and 20 to drink in their establishment,'' said Attorney General Joe Meyer. ''So they had better clear the tables.''

Complicating the issue is that the law is written in such a way that, unless city ordinances say otherwise, those ages 19 and 20 can still be inside a liquor establishment after the age limit changes.

''It's going to create an unenforceable object,'' said Police Chief Don Pierson. ''It will be totally impossible for us to enforce a law that allows 19- and 20-year-olds in, but doesn't let them drink. The biggest problem is for the bar owner himself, because it is his responsibility to make sure they do not drink.''

Bar owners can be fined $35 to $750 and receive up to six months in jail for allowing underage drinking. Drinkers 18 and under are handled as juvenile offenders; those 19 and 20 will face the same punishment as bar owners, said police Sgt. Marty Luna.

Many communities around the state are working to enact ordinances to prohibit those under 21 from entering bars.

Bars and taverns also have the option of not letting in anyone under 21.

''Our option is right now to make it a day early here,'' said Rick Kilgore, assistant food and beverage director for the Hitching Post Inn in Cheyenne. ''We do have the option to refuse service to anybody, so instead of going through the headaches of getting 19-and 20-year-olds out of here after they've been drinking all night, our plan ... is we'll cut it off June 29.''

Kilgore said another option is simply to close the bar at midnight Thursday.

Leo McCue, president of the Wyoming Liquor Dealers Association, also said many bar owners might just close their establishements to those under 21 to avoid problems.

''Most people prefer that we don't allow 19-year-olds in because it is too hard to control,'' he said. ''We have to police our own places ... we are the law enforcement.

''It is very difficult to keep someone from ordering a pitcher of beer and not keep someone from pouring a glass for (an underage) friend they are talking to. We are hoping the cities enact ordinances that will take care of that situation.''

Cheyenne Club manager John Lambousis, who plans to keep entertaining people ages 19 and 20, said the two-hour gap should not be much trouble.

''Normally we are not that busy on a Thursday, so we will identify them with a stamp and let them drink and by midnight, there should just be a handful of those people,'' he said. ''Instead of leaving at 1 or 2 (a.m.), they can cut the party short a little bit.''