WASHINGTON — The Senate voted unanimously on Thursday to recognize the Armenian genocide as a matter of American foreign policy, a move that was made over the objections of the Trump administration and that underscored lawmakers’ bipartisan rage at Turkey.

The passage of the legislation, a symbolic victory for Armenians around the world, is the first time Congress has formally designated the 1915 mass killings of an estimated 1.5 million Armenians at the hands of the Ottoman Empire as a genocide.

“To overlook human suffering is not who we are as a people,” a visibly emotional Senator Robert Menendez of New Jersey, the top Democrat on the Foreign Relations Committee, said on the Senate floor moments after the legislation passed. “It is not what we stand for as a nation. We are better than that, and our foreign policy should always reflect this.”

Mr. Menendez and his Republican co-sponsor, Senator Ted Cruz of Texas, had tried for three consecutive weeks to force passage of the measure after the House approved it in October. Each time, they were blocked by a Republican senator who, at the behest of the White House, argued that such a resolution would damage the United States-Turkey relationship.