WASHINGTON — A divided Senate Judiciary Committee on Thursday moved federal prosecutor Loretta Lynch a key stop closer to the attorney general’s office, in a vote that could foreshadow a narrow confirmation to come.

Aided by South Carolina Sen. Lindsey Graham and two other conservative Republicans, the Republican-controlled panel endorsed Lynch’s nomination in a 12-8 vote. The committee’s approval sets the stage for final Senate action sometime in March.

“I think she’s well-qualified. I think she’s a decent person,” Graham said. “All things being equal, I think the Democratic president is well within bounds in choosing her. Nobody on our side would have chosen her, but when you win the White House, certain things come your way.”

Utah Republican Sen. Orrin Hatch, a former chairman of the committee, and Arizona Republican Sen. Jeff Flake joined Graham and all of the committee’s Democrats in voting for Lynch.

To win confirmation in the full Senate, Lynch will need the support of all 44 Democrats, two independents who caucus with the Democrats, including Maine’s Angus King, plus at least five Republicans. For the closest possible margin, she would require four Republicans plus Vice President Joe Biden to cast the tie-breaking vote.

The Republicans voting against Lynch did not question her credentials, experience or fitness for office. Instead, some cited the Obama administration’s actions on immigration, while others insisted their concerns revolve around the need for changes at the Justice Department.

“I do not see someone who is going to recognize that there are legitimate issues that need to be addressed,” said freshman Sen. Thom Tillis, R-N.C., who represents the state where Lynch was raised and where her parents still reside.

A native of Greensboro, N.C., whose parents now live in Durham, N.C., the 55-year-old Lynch graduated from Harvard University and Harvard Law School. A longtime federal prosecutor, she currently serves as the Brooklyn-based U.S. attorney for the Eastern District of New York.

If confirmed, she would be the first African-American woman to serve as the nation’s top law enforcement officer.