Train drivers refused to travel on the section of track where two people died in a Sydney-Melbourne XPT derailment, the rail union says.

The XPT diesel locomotive and five carriages came off the tracks near Wallan Station, 45km north of Melbourne, on Thursday evening.

A male driver, 54, from the ACT and a 49-year-old female train pilot from Castlemaine, in regional Victoria, were killed in the crash and several passengers were injured.

“The Sydney to Melbourne XPT train derailment near Wallan Station last night occurred over a section of track over which was awaiting maintenance,” RTBU State Secretary Luba Grigorovitch said on Friday.

“Conditions were altered and V/Line drivers rightly refused to traverse this section over the past week.”

V/Line would not comment as it does not manage that track.

Deputy Prime Minister Michael McCormack welcomed the union’s involvement in the investigation.

“I invite the unions to put all those matters to the proper authorities so that we can fully investigate what has taken place beforehand and of course, what took place last night,” he said while at the scene of the derailment on Friday.

“No authority in Australia would allow a train to travel on an unsafe track. That just wouldn’t happen. I know the ARTC (Australian Rail Track Corporation) monitors these things closely and regularly.

“Public safety, when it comes to public transport, is first and foremost, whether it is state or whether it is federal.”

The federal government-owned ARTC manages and operates the track and is understood to be responsible for the signalling.

The ARTC has been contacted for comment.

The train was about two hours behind its scheduled arrival at Southern Cross Station in Melbourne when it came off the tracks.

Transport for NSW operate and run the trains on this track.

NSW Regional Transport Minister Paul Toole said he was not aware of any concerns about the condition of the track.

“I am not aware of that. We can’t speculate as to what the investigation will find, but we are keen to see what comes out of that into the future,” Mr Toole said while in Victoria.

In December, Infrastructure Australia stated the business case for an upgrade of the Melbourne-Albury North East Rail Line “should not be ­included on its priority list”.

It is not publicly known what speed the train was travelling at the time it came off the tracks, with the cause of the incident under investigation.

The Border Mail has reported the signal hut in Wallan was destroyed by fire earlier this month.