By contrast, many other countries that supply oil are not stable, secure or friendly to U.S. interests, Harper said at a White House news conference after a meeting with President Barack Obama.
Pipeline supporters have singled out countries such as Venezuela, Nigeria, Saudi Arabia and Iran as places where the United States faces security threats or instability. Canada's environment minister has used the term "ethical oil" to describe his country's crude supplies, saying Canada respects human rights, workers' rights and environmental responsibility.
"The choice that the United States faces in all of these matters is whether to increase its capacity to accept such energy from the most secure, most stable and friendliest location it can possibly get that energy, which is Canada, or from other places that are not as secure, stable or friendly to the interests and values of the United States," Harper said.
Obama, standing next to Harper at a news conference, did not talk about the pipeline issue.
State Department spokesman P.J. Crowley said U.S. officials agree with Harper that "seeking energy from stable trading partners is definitely in our national interest." The pipeline project remains under review, Crowley said.
A Canadian company is pushing to build a 1,900-mile pipeline (3,060-kilometer) pipeline that would carry crude oil extracted from tar sands in Alberta, Canada, to refineries in Texas. The pipeline would double the capacity of an existing pipeline from Canada, producing more than 500,000 barrels a day of crude oil derived from formations of sand, clay and water in western Canada.
The $7 billion Keystone XL pipeline could reduce substantially U.S. dependency on oil from the Middle East and other regions, according to a report commissioned by the Obama administration. The study suggests that the pipeline, coupled with a reduction in overall U.S. oil demand, "could essentially eliminate Middle East crude imports longer term."
The report was completed in December but made public this week in advance of Obama's meeting with Harper.
"This study supports what we have been saying for some time: that Keystone XL will improve U.S. energy security and reduce dependence on foreign oil from the Middle East and Venezuela," said Russ Girling, CEO of Calgary-based TransCanada, the project's developer. "Keystone XL will also create 20,000 high-paying jobs for American families and inject $20 billion into the U.S. economy."
An environmental group that opposes the pipeline said Harper failed to acknowledge that tar sands oil is highly polluting.
"There are cleaner, safer ways to meet U.S. energy needs than to import this dirty oil from Canada via a dangerous pipeline through America's heartland," said Alex Moore of the environmental group Friends of the Earth.
Moore said he was glad that Obama did not express support for the pipeline, adding that if Obama is serious about making America a leader in clean energy, "he has no choice but to stop this project."
Environmental groups call the pipeline an ecological disaster waiting to happen and say the so-called tar sands produce "dirty" oil that requires huge amounts of energy to extract.
A coalition of 86 groups sent a letter Friday urging Obama to reject the pipeline and "stop giving a free pass to oil companies to increase profits at the expense of Americans." Activists also gathered across from the White House on Friday to protest the project.
The American Petroleum Institute, meanwhile, sent a letter urging Obama to approve the project.
Secretary of State Hillary Rodham Clinton must grant a permit allowing the pipeline to cross the U.S-Canadian border before TransCanada can proceed. Clinton said in October she was "inclined" to approve the project but has since backed off those remarks.
Lawmakers from both parties have written to the State Department for and against the pipeline, which would travel through Montana, South Dakota, Nebraska, Kansas and Oklahoma before reaching Texas. Some of the strongest opposition is in Nebraska, where the state's two U.S. senators have raised sharp questions. The pipeline would travel over parts of the massive Ogallala aquifer, which supplies drinking water to about 2 million people in Nebraska and seven other states and supports irrigation.
The aquifer serves five of the states where traversed by the pipeline route: South Dakota, Nebraska, Kansas, Oklahoma and Texas. Wyoming, Colorado and New Mexico also tap into the underground water supply
Associated Press writer Bradley Klapper contributed to this story.