Lady Gaga visited the state of Maine on the eve of a key Senate vote to urge its two US senators to help repeal the military's ban on gays serving openly.

More than 2,000 people attended a rally at Deering Oaks Park, where the Grammy Award-winning Poker Face singer stood alongside Air Force, Army and Marine veterans who were discharged because of the policy, which prohibits service members from revealing if they are gay and recruiters from asking about people's sexual orientations.

Lady Gaga railed against what she called the injustice of having goodhearted gay soldiers booted from military service while straight soldiers who harbour hatred toward gays are allowed to fight for their country. She suggested a new policy should target straight soldiers who are "uncomfortable" with gay soldiers in their midst.

"Our new law is called 'If you don't like it, go home!'" she said.

The rally was organised by Washington-based Servicemembers Legal Defense Network, which is trying to pressure Republican Senators Olympia Snowe and Susan Collins of Maine to vote to allow a repeal of the so-called "don't ask" policy, put in place in 1993 by former president Bill Clinton.

Lady Gaga, famous for hits such as Bad Romance and Paparazzi, skipped her trademark outlandish outfits in favour of a black suit and a pair of glasses.

At last week's Video Music Awards ceremony, where she won eight awards, she was escorted by ex-servicemen who were discharged or left the military as the result of the "don't ask" policy. She recently called on Senate Majority Leader Harry Reid to repeal the policy during an interview with talk show host Ellen DeGeneres.