RIGA, Latvia—U.K. Prime Minister David Cameron will visit Berlin and Paris next week for talks, a government official said, as he vowed to start talks on European Union reforms "in earnest" Friday on the sidelines of an EU leaders summit in Riga.

In a speech on Thursday, Mr. Cameron said limiting migration to the U.K. from within the European Union through welfare-payment changes will be an "absolute requirement," as he embarks on negotiations to deliver on a pledge to reform the U.K.'s relationship with Brussels.

Mr. Cameron reiterated that changes to welfare entitlements would be a red line for his negotiations. He has promised to secure reforms and then hold a referendum on whether the U.K. should leave the EU before the end of 2017.

Speaking on arrival at the Riga summit, which brings together leaders from the EU and its eastern partners, Mr. Cameron warned that his government's negotiations with the bloc wouldn't be easy.

"All I'd say is that there will be ups and downs. You'll hear one day this is possible and the next day, something else is impossible," he told reporters. "But one thing throughout all of this that will be constant, is my determination to deliver for the British people reform of the EU, so they get a proper choice in the referendum that we'll hold...before the end of 2017."

U.K. officials said Mr. Cameron will meet a number of EU leaders in Riga. He held a short discussion Friday morning with the Polish prime minister, whose country has seen some of the biggest numbers of people move to work in the U.K. since it joined the bloc in 2004.

He will also hold discussions with the leaders of Hungary and Sweden and will meet European Council President Donald Tusk, who will be formally in charge of negotiations on EU reforms, in Brussels.

Friday's meetings will be followed by meetings with the French and German leaders toward the end of next week. European Commission President Jean-Claude Juncker said Friday he may meet with the British prime minister early next week.

Berlin will play a crucial role in Britain's bid to win back powers. German Chancellor Angela Merkel has already held talks with Mr. Cameron on the issue before May's general election and Mr. Cameron will face a huge challenge if the German government, by far the most influential in the bloc right now, is set against his proposals.

The prime minister has made immigration a key plank of his reform efforts. Mr. Cameron has said he wants the U.K. to remain in a reformed EU.

In his speech Thursday, Mr. Cameron said he supported freedom of movement within the EU. But he added he wasn't alone in arguing that there needed to be a change in the system to allay concerns that national welfare systems could provide an "unintended additional incentive for large migratory movements."

However, Mr. Cameron's push for reform has been met with a cool response in Riga so far.

Lithuanian President Dalia Grybauskaite said Friday morning that freedom of movement within the bloc was "the core value" of the EU.

"In Europe, we always try to find the solutions" to disagreements, she said but warned that everyone must be "consensual"— not just Mr. Cameron's European partners.

Estonian Prime Minister Taavi Roivas said Thursday he was open to discussing Britain's ideas, but wasn't willing to "lose or even have less of" basic EU freedoms.

Danish Prime Minister Helle Thorning-Schmidt said she sincerely hopes to find "good solutions for Britain," but refused to engage on the option of a change to EU basic treaties—one way of handing the U.K. back some EU powers.

"First of all, we have to listen to what Mr. Cameron has to say about what kind of changes they want to achieve and then we will take it from there."

Write to Laurence Norman at laurence.norman@wsj.com and Nicholas Winning at nick.winning@wsj.com

Subscribe to WSJ: http://online.wsj.com?mod=djnwires