LEWISTON, Maine — Four-term Sen. Susan Collins, R-Maine, who declared in August that she couldn’t vote for Donald Trump, opted on Election Day to write in House Speaker Paul Ryan for president.

The Maine Republican said she doesn’t always agree with Ryan, but he is “a person of great character” who’s not afraid to take on big issues.

Trump lost her vote because of his penchant for ridiculing and abusing people who got under his skin, from the father of a dead soldier who spoke at the Democratic National Convention to a reporter with a disability.

But during an address Wednesday as part of the Bates College Purposeful Work Unplugged speaker series, Collins said she saw reason to hope for “a fresh start” in Washington after listening to Trump and Democrat Hillary Clinton tell the nation that it’s time to pull together.

Collins said she is “very happy that this very long, rancorous and divisive campaign has drawn to a close” with a call from both the winning and losing candidates to “unify our country.”

“We need to move forward with the business of this nation,” Collins said.

She said the country has “deep divisions” and a fraying social fabric that needs to be overcome by a renewed commitment to civility and compromise.

Clayton Spencer, the college’s president, said the sort of “independent but collaborative leadership” that Collins has long exemplified “will be sorely tested” in the months ahead.

Collins is one of a small band of GOP senators who took a public stand against Trump, exposing a rift in Republican ranks that may have a lingering impact in the new president’s relationship with them. She said, though, she is confident she can work with Trump on key issues such as rebuilding the nation’s infrastructure, including Maine’s aging roads and bridges.

She said she was impressed with how gracious Clinton was during her concession speech after “a painful election,” something she could sympathize with after getting clobbered in a four-way gubernatorial race 22 years ago.

“When you lose an election, it’s personal,” Collins said. “You feel rejected.”

At the time, she said, she “gave up everything” to run for governor — her job, her insurance and ultimately her savings. By the time it was over, Collins recalled, she was unemployed and uninsured.

She landed on her feet, though, and wound up winning a Senate race four years later, serving today with the man who beat her, Angus King.

“It’s ironic how life comes full circle,” she said.

She urged students to pursue their dreams even if they suffer setbacks.

“I learned so much from defeat,” she said.

Asked by Bates College’s Strategic and Policy Initiatives Director Peggy Rotundo what she would say to students who are grieving, lost or struggling in the wake of Trump’s victory, Collins said the best thing they could do “is to get involved” and try to make a difference.

They shouldn’t “feel alienated from our country or our political system,” Collins said.

“Elections are not always going to go the way you’d like them to go,” she said. But, she added, “if you don’t prevail this time, you may prevail next time.”

For the first time in a decade, Collins will be part of a Congress that’s entirely in the control of Republicans at the same time the White House is also in the party’s hands.

She said, though, that people still shouldn’t expect fast progress.

Collins said she hopes there is more progress and less gridlock, but people need to recognize that the legislative process “tends to be slow and deliberative.”

“It’s still going to be difficult to achieve consensus,” Collins said, especially because Senate rules make it tough to pass major legislation unless 60 senators agree. The GOP will likely control only 52 seats, so Democrats won’t be entirely shut out of the process.

One issue Collins would like to make progress on is Social Security.

“Eventually we’re going to have to tackle this problem,” said Collins, who is chairwoman of the Aging Committee.

She suggested that it could be resolved if both parties could put aside politics the way former House Speaker Tip O’Neill and President Ronald Reagan did in a 1980s fix that kept the program solvent for decades by hiking the payroll tax, raising the retirement age to 67 for younger workers and paring benefits slightly.