CLEVELAND — Donald J. Trump, on the eve of accepting the Republican nomination for president, explicitly raised new questions on Wednesday about his commitment to automatically defending NATO allies if they are attacked, saying he would first look at their contributions to the alliance.

Asked about Russia’s threatening activities, which have unnerved the small Baltic States that are among the more recent entrants into NATO, Mr. Trump said that if Russia attacked them, he would decide whether to come to their aid only after reviewing if those nations have “fulfilled their obligations to us.”

“If they fulfill their obligations to us,” he added, “the answer is yes.”

Mr. Trump’s statement appeared to be the first time that a major candidate for president had suggested conditioning the United States’ defense of its major allies. It was consistent, however, with his previous threat to withdraw American forces from Europe and Asia if those allies fail to pay more for American protection.

Mr. Trump also said he would not pressure Turkey or other authoritarian allies about conducting purges of their political adversaries or cracking down on civil liberties. The United States, he said, has to “fix our own mess” before trying to alter the behavior of other nations.