PORTLAND — John Eder will continue to run for mayor despite winning a scholarship to study in Ireland next spring.

Eder, a student at Southern Maine Community College, won a scholarship from the George J. Mitchell Scholarship Exchange program to study next semester at the Cork Institute of Technology in Ireland.

Eder said he is committed to winning the mayoral race and will decline the scholarship if he’s elected in November.

But if he loses the race, he said, he will take the scholarship.

“It’s a very nice consolation prize,” Eder said.

Eder entered the mayoral race earlier this year, about a month after applying for the scholarship. He learned he won the scholarship in late spring, Eder said, although SMCC did not announce it until Wednesday.

Eder said he has an agreement with the Mitchell Scholarship program that will allow him to decline the award in November if he wins the race.

Some might question his decision to stay in the race after learning of the scholarship, Eder conceded. He collected the necessary signatures to get on the ballot in August, a couple of months after winning the scholarship.

But being willing to decline the scholarship to serve as mayor, if he wins, shows his commitment to Portland, Eder said,

“I want to take part in shaping the city that I love,” he said. “I would say, ‘Because I have this nice job offer to be the mayor of Maine’s biggest city, can you blame me (for declining the scholarship)?’ “

Eder is majoring in liberal studies at SMCC. If he ends up taking the scholarship, he said, he would leave for Ireland in January and return in time to graduate in May. He then plans to attend the University of Southern Maine, where he would major in political science.