Pakistan and Thailand, on Tuesday, agreed to boost bilateral trade to $2 billion over the next five years and expressed hope to eventually enter a proposed free-trade agreement, as both nations scramble to ward off economic crises stemming from different sets of issues.

Pakistan has been battling a crippling energy crisis, which is estimated to have cut the nation’s already weak economic growth by nearly 2 percent, while Thailand has slipped into recession, contrary to expectations, exerting pressure on its government to shift focus to investments from a consumption-led growth cycle.

Pakistan’s Prime Minister Nawaz Sharif and his Thai counterpart, Yingluck Shinawatra, who arrived in Pakistan on Tuesday for a two-day state visit, said in a joint statement that both sides agreed to improve ties in the fields of trade, infrastructure, defense, tourism and technology, in the run-up to signing a free-trade pact.

Sharif said private enterprises from both sides were also meeting on the sidelines of Shinawatra’s visit, and noted that both countries hoped to “utilize each other’s geo-strategic location,” by improving connectivity between the regions.

Pakistan shares a border with India, Asia's third-largest economy, while Thailand has the newly resurgent Myanmar on its western border and a vibrant Malaysia in the south to contend with.

“We have invited Thai private businesses to invest in Pakistan in various sectors, including infrastructure development, energy, auto parts manufacturing, food processing, packaging, gems and jewelry, tourism and hospitality,” Sharif said at a joint press conference with Shinawatra, in Pakistan’s capital of Islamabad, Associated Press of Pakistan reported.

Pakistan, which grew by 3.59 percent in the fiscal year ending in 2013, has been trying to attract foreign investment with state lawmakers urging Pakistan’s federal government to cut taxes on foreign investments by 2 percent. 

Bilateral trade between Pakistan and Thailand reached $670 million in 2011, with Pakistan registering a trade deficit of $465 million, according to data from the Federation of Pakistan Chambers of Commerce and Industry.

Thailand, which had witnessed a significant surge in the inflow of foreign funds in the recent past, is among Asia’s emerging markets that are believed to be at risk of a rapid reversal of inflows, triggered by widespread uncertainty over the future of the U.S. Federal Reserve's stimulus program. Such an outflow of funds could leave growing markets vulnerable to a slowdown. However, before the recent surge in outflows, Thai authorities had been trying to save the export-oriented economy by restricting inflows to avoid a sudden appreciation in the Thai baht.

“Foreign investors in the first half of May sold short-ended notes to buy the longer ones, as they were concerned about the authorities’ potential measures [to tame capital inflows], but they sold both short- and long-date bonds in the latter half on speculation that the Fed will start to unwind its asset-buying program soon,” Ariya Tiranaprakij, executive vice-president of the Thai Bond Market Association, told Bangkok Post in June.

The Thai economy contracted 0.3 percent in the second quarter of 2013, after expanding by 1.7 percent in the first quarter. In the last quarter of 2012, the country's GDP had seen a growth spurt, jumping 18.9 percent year-on-year over the same period in 2011. Thailand, on Monday, downgraded its full-year growth forecast for 2013 to between 3.8 percent and 4.3 percent from a previous range of 4.2 percent to 5.2 percent.

The Pakistani government, which is finding ways to end an energy crisis, is also under pressure to create jobs and to rein in inflation. Pakistan registered a total trade deficit of $1.71 billion in July -- the first month of the nation’s fiscal year ending in 2014 -- falling 1.35 percent from a $1.74 billion deficit recorded in the previous month, according to data released on Tuesday, by the country's Bureau of Statistics.

The International Monetary Fund, or IMF, said, in April, that Pakistan’s GDP growth rate is projected to decline to 3.3 percent in the fiscal year ending in 2014, while inflation is estimated to rise to 9.5 percent, and unemployment could grow to 10.7 percent.

“In Pakistan, high fiscal deficits and a difficult business climate are contributing to a sharp fall in private investment and growth,” IMF said in the report.