KABUL, Afghanistan – Gen. David Petraeus began his tenure in Afghanistan on Saturday by calling for “unity of effort” among U.S. civilian and military officials and cooperation between the larger NATO alliance to achieve the goals of beating back the Taliban insurgency and bolstering the Afghan government.

In his first remarks in Kabul before he officially assumes his position today as the top American commander in Afghanistan, Petraeus said that “in this important endeavor, cooperation is not optional.”

“Civilian and military, Afghan and international, we are a part of one team, with one mission,” he told a gathering of hundreds of guests at the U.S. Embassy in Kabul as part of a Fourth of July ceremony.

The comments by Petraeus and U.S. Ambassador Karl Eikenberry sought to set a tone of renewed partnership between military and civilian officials in Afghanistan. During the past year, tensions in this relationship emerged as an obstacle to the American effort and culminated in the firing of Gen. Stanley A. McChrystal last week after he and his staff made disparaging comments about senior Obama administration officials, including Eikenberry, in a Rolling Stone magazine article.

On Saturday morning, Eikenberry lightened the mood by calling Petraeus, his former West Point schoolmate and fellow Army Ranger, a “great friend” and handed him his “very own United States embassy access badge.”

“Welcome aboard,” Eikenberry told Petraeus at the sunny outdoor ceremony at an embassy decorated with red, white and blue bunting and Independence Day banners. “You are welcome at this embassy, as we say, 24-7. We look forward to being your teammates and to our continued combined success.”

Petraeus replied, “I feel like one of the team now.”

“I want you to know that it’s a privilege to be your Ranger buddy in this critical endeavor,” the general said.

Petraeus arrived in Kabul on Friday evening from NATO headquarters in Brussels, flying with Eikenberry as well as Ambassador Mark Sedwill, the British diplomat who is NATO’S senior civilian representative in Afghanistan.

This visit, Petraeus said, reminded him that “this is an effort in which we must achieve unity of effort and common purpose.”

“And I know that you all share the unshakeable commitment to teamwork that Ambassador Eikenberry and I share,” Petraeus said. “This is a tough mission, there is nothing easy about it. But working together we can achieve progress and we can achieve our mutual objectives.”