AUGUSTA — Two days after his party suffered defeat at the hands of Republicans, Maine Democratic Party Chairman Ben Grant announced Thursday he would step down.

Grant, a 37-year-old lawyer and former Maine Senate staffer from Portland, took over the party in 2011, just months after Democrats suffered a similar thumping as Republicans rode a wave of support into the Blaine House and majorities in both chambers of the Legislature.

On Tuesday, Democrats failed to reclaim the governorship and lost their majority in the state Senate. The party also saw Maine’s 2nd Congressional District go Republican for the first time in two decades.

Grant said he had made the decision to step down before Election Day and that his pending departure was “an open secret” among party officials. Still, he said, after a loss at the polls, a change in leadership could be good for the party.

“You’ve got to tip your hat to the other side,” he said. “The governor and (state GOP Chairman) Rick Bennett ran a good campaign. We need to take stock in ourselves, and now’s the time for a change in leadership to do that.”

The next chairman will be chosen by the state committee on Nov. 16. Whoever wins will inherit a party in a similar position to the one Grant took over in 2011.

After the shellacking by Republicans in 2010, Grant and his cohorts rebuilt the Democratic Party machine for big victories in 2012. The state went to President Barack Obama and Democrats regained control of the Legislature. The party also saw success in passing voter referendums to legalize same-sex marriage and restore same-day voter registration.