WASHINGTON - In his first visit to the Pentagon as commander in chief, President Barack Obama today thanked U.S. troops and pledged to provide the resources they need to accomplish their missions.

Obama spoke to reporters here after meeting with the Joint Chiefs of Staff and Defense Secretary Robert M. Gates to discuss military readiness, "difficult decisions" on Iraq and Afghanistan and other national security threats and objectives.

"I want to first of all thank all of the men and women in uniform who are represented here. They are the best that this country has to offer," Obama said after he and Vice President Joe Biden shook hands with a row of troops from all service branches who lined an E-ring Pentagon hallway.

"All of you who are serving in the U.S. armed forces are going to have my full support, and one of my duties as president is going to be to make sure that you have what you need to accomplish your missions," he said.

Obama said the first point he addressed with the Joint Chiefs -- the senior-ranking officers of each military service branch -- was gratitude for the service and sacrifice of troops and military families, who he said were responsible for national freedoms that sometimes are taken for granted.

He also suggested that he would relieve some of the pressure placed on the military by more evenly distributing responsibility among other U.S. government elements.

"We have for a long time put enormous pressure on our military to carry out a whole set of missions, sometimes not with the sort of strategic support and the use of all aspects of American power to make sure that they're not carrying the full load," he said. "And that's something that I spoke to the chiefs about and that I intend to change as president of the United States."

The president added that those involved in this afternoon's meeting in "The Tank," the secure area in the Joint Chiefs of Staff wing of the Pentagon, agreed to make sure "the health of our force is always in our sights." Participants included Navy Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, and the chiefs of the Army, Navy, Air Force, Marine Corps. The commandant of the Coast Guard, though not a member of the Joint Chiefs, also participated.

"I know [they] are constantly thinking about what we need to do to make sure that people who are in uniform for the United States are getting the kinds of support that they need and that [their families need], and that's something that I absolutely am committed to, and I know that Vice President Biden is as well," he said.

Some of the most urgent issues facing White House and Pentagon officials include the ways forward in Iraq and Afghanistan.

"We're going to have some difficult decisions that we're going to have to make surrounding Iraq and Afghanistan most immediately," Obama said. "Obviously, our efforts to continue to go after extremist organizations that would do harm to the homeland is uppermost in our minds.

"I have every confidence that our military is going to do their job, and I intend to make sure that the civilian side of the ledger does its job to support what they are doing," he added.

Obama added that he a "wonderful discussion" with the Joint Chiefs about short- and long-term threats facing the United States.

"We talked about some of the broader, global risks that may arise, and the kind of planning and coordination that's going to be required between our military and our civilian forces in order to accomplish our long term national security agendas," he said.

The president has been engaged with Defense Department and military officials since taking office Jan. 20.

During a meeting at the White House on his first full day in office, Obama directed key defense and military officials to plan for a "responsible military drawdown in Iraq." The participants included Gates and Mullen, as well as Gen. David H. Petraeus, commander of U.S. Central Command.

Gen. Raymond T. Odierno, commander of Multinational Force Iraq, also joined the Jan. 21 meeting via teleconference. U.S. Ambassador to Iraq Ryan C. Crocker, key Cabinet members and senior national security officials also participated, collectively providing what Obama called "a full update on the situation in Iraq."