The Liberal Democrats will give preferences to the Labor Party ahead of Liberal Party candidate Andrew Hastie at the Canning byelection.

The preference swap deal with the ALP is a blow to Prime Minister Tony Abbott whose future could hinge on the strength of result in Canning.

The Liberal Democrats have the second place on the byelection ballot paper and an ALP source said: "This is a problem for the Liberals in a tight race".

Announcing the decision in Canberra on Friday, Liberal Democrat Senator David Leyonhjelm said "the Prime Minister has done a terrible job in selling the government's agenda".