BOSTON (AP) — Gov. Deval Patrick and Roderick Ireland both cited the civil rights struggle Monday as the state’s first Black chief executive swore in the state’s first Black chief justice of the Supreme Judicial Court.

Ireland, beaming before family, colleagues, members of his church and friends from his youth in Springfield, recalled being pushed toward the trades by a middle-school guidance counselor and once being mistaken for a valet as he waited for his own car at one of Boston’s best hotels.

“Obviously, I’ve had some experiences that are probably different from those of my colleagues on the SJC,” the new chief justice said as his robe-draped colleagues looked back at him from the front row. “That means that I may look at the world a little differently. My hope is that, as chief justice, I will bring a perspective which reflects all that I am, including my roots, my culture, my heritage and my life experience.”

Patrick, who previously described race as a “secondary or tertiary” factor in his appointment, gave a fresh perspective by declaring that “social justice has never been far from my work or my consciousness.”

The former civil rights attorney told a heavily Black crowd gathered in the John Adams Courthouse that having an African-American head the SJC, the oldest continuously operating court in the western hemisphere, was an important symbolic achievement.

“In the darkest days of Jim Crow, in my own lifetime, it was the courts to which black people turned, because no other avenue worked,” the governor said. “The courts listened, when no one else would, and that’s exactly as the system is supposed to work.”

Ireland said the primary goals of his tenure, which will last less than five years before the 66-year-old reaches the mandatory retirement age of 70, include building public understanding of the court system and process; improving relations between the Judicial and Executive and Legislative branches; and building an effective lobbying system for court funding.

Ireland replaced Margaret Marshall, who vaulted herself and the seven-member court to national attention in 2003 when, as chief justice, she authored the opinion making Massachusetts the first state in the nation to legalize gay marriage. Ireland concurred in the 4-3 decision.

As chief, Ireland will not only administer the SJC, but assign its opinion-writing and manage the statewide court system as head of the Judicial Branch.

He assumes those responsibilities while the courts are plagued by high caseloads, budget challenges and allegations of political favoritism in the hiring of the Probation Department it oversees.

He didn’t mention the Probation situation, even though some of its chief actors were in the audience, but he did raise the budget and caseload challenges in a general sense.

“The challenge before us is to do what we can with what we have now, while not losing sight of our aspirations when the economy improves,” Ireland said.

The swearing-in was a festive affair, held in the soaring great hall of the recently remodeled courthouse. Among those looking on was former Gov. Michael Dukakis, who first appointed Ireland to the bench 33 years ago.

Two particularly stirring moments occurred when jazz saxophonist Andre Ward played a musical interlude and benediction as the notes echoed through the building.

Another was when Ireland’s 93-year-old mother, Helen, held the Bible for his oath.

Friends and colleagues describe Ireland as a humble man, despite holding advanced degrees to the doctorate level.

That was apparent when he was led into the hall by a State Police honor guard and Patrick. Despite the processional, the first hand the chief justice-to-be shook in a room filled with dignitaries was that of a court officer.

Afterward, Patrick said he will nominate a replacement for Ireland, his fourth court appointment, “soon.” It will have to be approved by the nine members of the Governor’s Council.