With the Defense Department preparing to end its 18-year ban on gays in uniform next Tuesday, gay rights groups are reminding the rank and file about the Pentagon’s policy on political activity as several U.S. military facilities are expected to host parties marking the ban’s end.

“We expect that most of the DADT repeal celebrations will be just that — celebrations of the repeal of a bad law. No special rules apply to attendance at or participation in such events,” according to the Servicemembers Legal Defense Network, a legal group representing troops affected by the ban.

According to military policy, troops should be allowed to attend the events, wear their uniforms and “speak as individuals about the importance of repeal to them personally and to the services generally,” SLDN said in a memo to troops published Monday. “They may say that they are happy and proud that they now do not have to hide their sexual orientation,” the memo said, but “they should not, of course, criticize their commanders (or past commanders) or elected officials or urge the election or defeat of candidates for office.”

Troops may also attend nonpartisan political events — such as parties hosted by gay rights groups — but may not wear their uniforms or do anything to suggest official sponsorship or endorsement, SLDN said.

Troops not in uniform are permitted to attend partisan political events as spectators but may not actively participate. Fundraising for a gay rights group at a military facility is prohibited.

The Pentagon did not immediately return requests for comment on the SLDN’s guidance.

Military officials haven’t publicly released any plans to mark the end of the ban next week. President Obama, who signed a bill ending “don’t ask, don’t tell” last December, is not expected to attend any events marking the end of the ban, according to administration officials and gay rights activists, because he will be in New York for meetings with the U.N. General Assembly.

Follow Ed O’Keefe on Twitter: @edatpost