OTTAWA -- The federal government has lost a bid to thwart a court challenge aimed at compelling Prime Minister Stephen Harper to fill Senate vacancies.

Federal Court Justice Sean Harrington has rejected the federal government's motion to have the case dismissed.

The case was launched by Vancouver lawyer Aniz Alani.

He is asking the court to declare that Senate vacancies must be filled within a reasonable time.

Harper has not appointed a senator since March 2013 -- when the scandal over improper expenses claimed by some senators began to heat up.

There are currently 20 vacancies in the 105-seat, unelected upper house.