WASHINGTON (AP) — Supreme Court nominee Elena Kagan on Tuesday defended her policy of barring military recruiters from the Harvard Law School career counseling office, saying the 'don't ask, don't tell" policy violated its anti-discrimination policy.

"We were trying to make sure that military recruiters had full and complete access to our students," Kagan told Republican Sen. Jeff Sessions, "and we were also trying to protect our anti-discriminatory policy. So we were trying to do both of those things."

Kagan repeated before the Senate Judiciary Committee her opposition to the "don't ask, don't tell" policy, and said she subsequently eased the policy at the request of the Department of Defense.

Kagan said that as dean of the law school, she never totally cut off military recruiters' access to students, but rather encouraged military veterans' organizations, rather than the school, to sponsor these efforts.

"I said on many occasions that this (military service) was a great thing for our students to think about doing in their lives," she told the Alabama senator. Kagan said that Harvard had a strict anti-discriminatory policy, "and the military could not sign that pledge."

The recruitment matter is one of the few points on her resume that Republicans have been able to use against her. Her policies and writings on the issue call up broader themes of patriotism and equal rights, both emotional topics at a time when the nation is at war and both parties are gearing up for the midterm elections. In some measure, the November balloting will be a referendum on her patron, President Barack Obama.

At the very heart of Kagan's decision at Harvard is an even more sensitive topic — her opposition to the military's "don't ask, don't tell" policy on openly gay soldiers.

Republicans contend that Harvard was the wrong venue for Kagan's "personal political grievance" and that briefly restricting the recruiters on campus broke the law. They conclude with questions about whether Kagan is anti-military and unfit to make impartial decisions on the high court.

Republicans have a tough case to make.

Judging by her own words, Kagan held the military in high regard and stories abound of her praising and thanking veterans on campus. She did call the policy toward gays "repugnant," but when court rulings went back and forth on the matter, she complied.

In a widely circulated 2003 memo, Kagan blasted "don't ask, don't tell" as "a moral injustice of the first order." She was explaining to students and faculty that under a federal law known as the Solomon Amendment, the university risked jeopardizing hundreds of millions of federal dollars unless the school allowed military recruiters on campus.

The following year, a federal appeals court struck down the Solomon Amendment as unconstitutional and Kagan re-imposed a restriction on recruiters.

But she wasn't the first at Harvard to take a stand against a military policy. The Solomon Amendment was passed by Congress two decades after Harvard first banned military recruiters over the issue of discrimination against gays. Afterward, military recruiters were still allowed to recruit students on campus through the Harvard Law School Veterans Association, a student group.

After the Sept. 11, 2001, terrorist attacks, Republicans in Congress said military recruiters should not be hampered in wartime. The Bush administration threatened to cut off funding, and in 2002 Harvard Law School relented and allowed military recruiters to use a campus office.

Kagan continued that policy when she became dean in 2003. Meanwhile, three dozen law schools challenged the Solomon Amendment in federal court. Harvard declined to join the lawsuit but filed a brief siding with the schools.

In 2004, the 3rd U.S. Circuit Court of Appeals found the Solomon Amendment unconstitutional, and Kagan banned military recruiters from using the campus career office, allowing them to work instead through the veterans group.

When Republicans in Congress renewed the threat of a funding cutoff, she relented and allowed the recruiters to use the career placement office. In 2006, the Supreme Court unanimously reversed the lower court's ruling and found it constitutional to deny funding to schools that restrict military recruiting.

Republicans note that the 3rd Circuit, seated in Philadelphia, had no jurisdiction over Harvard's policies and contend Kagan was bound by the Solomon Amendment throughout her time at Harvard.

"Her tenure ... was marred, in my view, by her decision to punish the military and would-be recruits for a policy — 'don't ask, don't tell' and the Solomon Amendment — that was enacted by members of Congress and signed into law by President Clinton," said Senate Republican Whip Jon Kyl of Arizona.

Sessions noted that Kagan apparently never brought up her problems with "don't ask, don't tell" while she worked in the Clinton administration.

"Instead, she went to Harvard and stood in the way of devoted, hardworking military recruiters, punishing them to air her personal political grievance in which they had no part," Sessions' office said in a statement.