U.S. Sen. Scott Brown, R-Mass., center left, gives a concession speech as his wife Gail Huff, right, watches on at an election night watch party in a hotel in Boston, Tuesday, Nov. 6, 2012. Brown lost to Democratic challenger Elizabeth Warren in his bid for re-election to the U.S. Senate. (AP Photo/Steven Senne)

WASHINGTON -- New Hampshire GOP Senate candidate Scott Brown has been making immigration into a key campaign issue, attacking Sen. Jeanne Shaheen (D-N.H.) on border security in an ad and criticizing President Barack Obama for falling down on the job in an op-ed. But he has found himself in a bit of a bind, since one of the reforms he's campaigning against is something that he once voted for.

In the op-ed, published Monday in the New Hampshire Union Leader, Brown lambastes "pro-amnesty policies that have encouraged people to come here illegally."

"This happens to be an area where I have a major difference with my opponent, Sen. Jeanne Shaheen, who twice voted against border fencing, in 2009 and 2013, and who supports granting legal status to young illegal immigrants," Brown wrote. "I support the construction of a border fence, oppose amnesty and believe that we needed to shut off the magnets that bring people here in violation of the law, like in-state tuition for illegals."

The New Hampshire legislature has considered measures around the issue of letting certain undocumented immigrants pay in-state tuition at public colleges and universities, but it is not currently the law.

Massachusetts, which Brown represented in the U.S. Senate until Elizabeth Warren (D) defeated him in 2012, has also looked at legislation granting undocumented immigrants in-state tuition. And Brown voted for it as a state senator in 2004.

He and 38 other state senators voted for a budget amendment that stated certain undocumented immigrants would be "eligible for in-state tuition rates and fees at the University of Massachusetts, or any commonwealth state or community college." No lawmaker voted against it.

WMUR has more on what happened:

Brown’s campaign said that, in effect, he was duped into voting for a late-night budget amendment along with others who oppose the idea. As part of the 544th vote on the Massachusetts state budget that year two Republican senators posed a motion to remove language relating to in-state tuition. At this point a Democratic senator proposed replacement language that actually re-instated the in-state tuition idea.

The provision did not become law -- it was vetoed by then-Gov. Mitt Romney (R).

The Brown campaign did not return a request for additional comment from The Huffington Post explaining the late-night duping, but spokeswoman Lizzy Guyton told WMUR, "Scott Brown has been against in-state tuition for illegal immigrants for nearly a decade."

According to HuffPost Pollster's average of the publicly available polling in the race, Shaheen currently leads Brown by about 8 percentage points.

Want more updates from Amanda? Sign up for her newsletter, Piping Hot Truth.