Libya's interim assembly said it was facing an impending "coup" on Tuesday after ex-rebel militias gave it a five-hour deadline to stand down.