BAGHDAD, Iraq (CNN) -- Turkey and Iraq signed an agreement Thursday that tightens and streamlines their working relationship in a range of areas, including the volatile issue of border security and the promise of a fruitful trade relationship.
Iraqi Prime Minister Nuri al-Maliki, left, welcomes Turkish leader Recep Tayyip Erdogan to Baghdad on Thursday.
The signing comes as Turkish Prime Minister Recep Tayyip Erdogan begins a two-day visit to Iraq, which Iraqi Prime Minister Nuri al-Maliki called historic.
The two signed a joint political declaration on the establishment of a "high-level strategic cooperation council" between the governments that will help forge a "long-term strategic partnership" and then spoke to reporters.
"As much as history and mutual interests bring us together, challenges also bring us together as well," al-Maliki said.
Erdogan said, "Iraq's future is our future."
"There is a mutual determination to form a security area in order to eliminate the terrorist threats between the two countries and an economic work area and an energy passage in order to provide better services for the two countries," he added.
The council is to meet once a year under the co-chairmanship of the prime ministers, three times a year at the ministerial level and once every three months by senior-level officials.
The effort -- based on what Iraq says is an "initiative" in March by Iraqi President Jalal Talabani -- will help both countries reach "bilateral agreements in a speedy and timely manner."
Ministers who head energy, trade, investments, security and water resources will be the council members.
Turkey and Iraq have had an awkward relationship in recent months due to issues of border security.
Turkey has taken the war against militants from the Kurdistan Workers' Party, or PKK, into the Kurdish region of northern Iraq, where the PKK has bases. The Turkish military has launched airstrikes against militant targets, and it conducted a weeklong ground offensive this year.
The declaration doesn't mention the PKK, but it calls for respecting each other's territories and "supporting the joint efforts of Iraq and Turkey to prevent the transit of terrorists and illegal arms to and from Iraq and emphasizing the importance of strengthening cooperation between Iraq and Turkey to control their common borders and prevent all kinds of illicit trafficking."
Erdogan, however, discussed the PKK in his remarks.
"When it comes to the terrorism of PKK, we found the support from the Iraqi government headed by Prime Minister [al-]Maliki and from the regional government in northern Iraq," he said, referring to the Kurdistan Regional Government.
"In reality, this terrorist organization is not only an enemy of Turkey but an enemy to Iraq. We do not allow for these kinds of attempts to harm the relations in the region and between the two countries."
The declaration also calls for completing a military framework agreement, concluding a pact on combating terrorism and fostering trade relations in both countries' defense-related industries.
Along with military and border security issues, the relationship also focuses on economics and energy.
The declaration calls for the conclusion of "strategic economic cooperation and integration agreements" between Iraq and Turkey before the end of the year.
The plan also calls for cooperation in the areas of tourism, free trade, reconstruction, water resources, agricultural needs, investment, small business development, exchange programs in the banking sector, the promotion of Iraq's transition to free enterprise and expedition of "the opening of new border gates between Turkey and Iraq."
For energy, the plan calls for establishing partnerships between the countries "as well as transporting Iraqi natural resources to the world markets through most viable export routes."
The latter refers to "upgrading and expanding" the existing capacity of Kirkuk-Yumurtalyk oil pipeline and building "a pipeline network to transport natural gas from Iraq to international markets via Turkey."
In his remarks, al-Maliki noted that Iraq's security strides have paved the way for a "phase of reconstruction, rebuilding and investment."
"Since we already have a great relationship with Turkey, we hope that the Turkish companies and investments play a role in supporting the process of rebuilding and reconstruction and come to the Iraqi field to participate in all projects of rebuilding that we decided here in Iraq that we will be in a new phase of revitalization in that field."
Erdogan is the second leader of Iraq's six neighboring countries to visit Baghdad. Iranian President Mahmoud Ahmadinejad traveled to Iraq in March.
The Turkish prime minister's visit comes during a relative lull in violence across the capital, but there were a couple of attacks Thursday in Baghdad, an Iraqi Interior Ministry official said.
A suicide car bomb exploded near an Iraqi army patrol in western Baghdad, killing two civilians and wounding 11 people, including seven Iraqi soldiers.
A roadside bomb targeting traffic police officers in eastern Baghdad killed a civilian and wounded five others, including three police officers.
CNN's Mohammed Tawfeeq and Saad Abedine contributed to this report.