By Vivian Salama, Wall Street Journal–

President Trump named Robert C. O’Brien as his new national security adviser, picking a top hostage-affairs official for the high-profile White House role.

Mr. Trump tweeted the announcement Wednesday morning, writing “I have worked long & hard with Robert. He will do a great job!”

Mr. O’Brien takes the job just as Mr. Trump faces a number of foreign-policy challenges, particularly as the administration determines how to respond to the recent attack on Saudi Arabia’s oil industry, which U.S. officials have blamed on Iran. The new national security adviser will also take a leading role on addressing crisis in Venezuela, as well as the president’s efforts to get North Korea to denuclearize.

Mr. O’Brien succeeds John Bolton, who departed the administration last week amid differences with Mr. Trump and other top advisers.

Mr. O’Brien, who currently serves as special envoy for hostage affairs at the State Department, will be Mr. Trump’s fourth national security adviser. He also served under the George W. Bush administration at both the U.S. Mission to the United Nations and the State Department.

Mr. O’Brien didn’t immediately respond to a request for comment.

Mr. O’Brien met with the president last week during which time they discussed the possibility of having him succeed Mr. Bolton, according to a person familiar with the meeting. Mr. Trump “liked the look of him,” and was impressed by his experience in both the public and private sector, according to an administration official.

Most recently, Mr. O’Brien was sent to Sweden to help negotiate the release of rapper A$AP Rocky, who was arrested after a violent altercation in Stockholm this summer. Mr. Trump had raised concern publicly over the rapper’s fate and Mr. O’Brien was sent to see what he could do. The rapper was later found guilty by a Swedish court, but won’t serve jail time.

The national security adviser post, which doesn’t require Senate confirmation, heads up a staff of several hundred specialists — or detailees, as they are known — from the Pentagon, State Department and U.S. intelligence agencies.

Write to Vivian Salama at vivian.salama@wsj.com