Washington (CNN) -- Mexican President Felipe Calderon and U.S. President Barack Obama on Thursday praised each other for increased cooperation on border security and commerce issues after talks at the White House that covered drug cartels, immigration, and other topics.
The two leaders said they had found a solution to an ongoing cross-border trucking dispute between their countries, and Obama added that he hopes to conclude an agreement with Mexico by the end of the year on developing new sources of energy in the Gulf of Mexico.
They also cited steps to combat drug cartels in Mexico and reduce the flow of weapons and drugs across the shared border.
"We are very mindful that the battle President Calderon is fighting inside of Mexico is not just his battle, it's also ours," Obama said. "We have to take responsibility just as he's taking responsibility. And that's true with respect to guns flowing from north to south, it's true about cash flowing north to south."
The two presidents discussed "how we can strengthen border security on both sides" to curtail the weapons and drug traffic," Obama said, calling it "a challenging task."
Calderon praised Obama for the joint responsibility on border issues and said, "There's a great deal that has to be improved in terms of how to share information, how to trace the weapons."
He noted the "large restrictions that President Obama and his administration have at a political level" involving conservative opposition to tightening gun laws and immigration reform.
"We all want to have a safe border," Calderon said. "I believe it's possible, although it will require huge technological and financial resources to achieve it," including advanced detection technology that is non-intrusive.
Calderon's Washington's visit came 16 days after American immigration and customs enforcement agent Jaime Zapata was shot and killed on a Mexican provincial highway in the central state of San Luis Potosi. His partner, Victor Avila Jr., was also shot, but survived.
Mexican authorities have arrested Julian Zapata, nicknamed "Tweety," and five other men in connection with the crime. Last weekend they arrested Sergio Mora Cortes, alias "El Toto," the leader of the Zetas cartel cell that operates in San Luis Potosi state.
Obama said Thursday that the United States has made a request for extradition, but offered no further information. Calderon said there is "political will" in Mexico for extradition if it complies with Mexican law, and the suspects must face justice no matter where any trial takes place.
He said the suspects told Mexican authorities "they didn't know that they were attacking U.S. agents," showing the grave threat posed by crime gangs to Mexican law enforcement officers.
"It seems to me that we are experiencing extraordinary circumstances that call for extraordinary actions by our governments," Calderon said.
Asked about changing the law in Mexico to allow U.S. agents to carry guns, Calderon said he would speak to legislators back home "to explore different alternatives." Otherwise, he said, the law clearly forbids agents of any foreign country, including the United States, from being armed or engaging in law enforcement activities.
Obama agreed that the U.S. agents in Mexico to help fight the drug cartels serve "in an advisory capacity," adding: "We do not carry out law enforcement activities inside of Mexico."
"What we can do is to make sure that our cooperation is strengthened and deepened, and becomes more effective over time," Obama said. "And we're constantly refining how we do that in a way that is respectful of Mexico's sovereignty. And obviously, I'm concerned about our own agents who are down there."
U.S. officials will examine "all our procedures and protocols in terms of how our agents travel throughout Mexico and we'll be working in close contact with Mexican law enforcement, who I'm sure will have important advice in terms of how we operate in that region," Obama said.
The joint appearance by the presidents amid their fifth face-to-face talks in the past two years revealed none of the tension between the United States and Mexico resulting from a U.S. diplomatic cable released last fall by WikiLeaks.
The cable quoted U.S. officials talking about "widespread corruption" in Mexican security agencies and "a dysfunctionally low level of collaboration." The cable, dated January 29, 2010, also described the Mexican army as "slow" and "risk averse" and concluded that only 2% of people arrested in Ciudad Juarez -- the most violent city in Mexico, wracked by drug-cartel-related killings -- were charged with a crime.
In a recent interview with the Mexican newspaper El Universal, Calderon stopped short of saying he was offended by the U.S. officials but he complained of what he implicitly interpreted as attempts by his neighbors to the north to meddle in Mexican domestic policy.
On Thursday, the talk was all about moving forward together.
"I have nothing but admiration for President Calderon in his willingness to take this on," Obama said of the fight against the drug cartels. "The easy thing to do would be for him to ignore the corrosive, corrupting influence of these drug cartels within Mexico."
Instead, Obama said, Calderon is "taking the hard path, and he's shown great courage and great risk in doing so. And the United States will support him in any ways that we can in order to help him achieve his goals, because his goals are our goals as well."
Calderon said the relationship between the countries as "co-responsible parties" in fighting transnational organized crime is "a paradigm change" that brings a new level of information sharing "unheard of in the past."
Mexico is the United States' third largest trade partner, after Canada and China, and the second largest market for American exports.
The trucking agreement, when finalized, would allow Mexican trucks to cross the border and operate in the United States, with Mexico dropping tariffs imposed on some U.S. goods, according to a White House statement. It resolves a dispute dating back almost to the North American Free Trade Agreement of 1994.
Calderon also was scheduled to meet separately with House Speaker John Boehner, R-Ohio, as well as American business leaders with interests in Mexico who are concerned about drug violence.
CNN's Rafael Romo and Tom Cohen contributed to this story.