An elephant in India seeking a route over a set of railroad tracks in the Jalpaiguri district of West Bengal ultimately found a road, but there was one apparent problem: The railroad crossing barriers were down, indicating an approaching train.

The elephant, which was trapped outside the Chapramari Wildlife Sanctuary, had already made several failed attempts to cross the tracks because of a metal fence, according to Caters News via Daily Mail.

Frustrated, and definitely impatient, the elephant negotiated the barriers despite the oncoming train:

The elephant deftly raised the first barrier with its trunk and head, and slid underneath.

"But even after crossing the barrier, the elephant dropped the barrier back in its place very cautiously," eyewitness Roni Chowdhury told Caters.

Next, the elephant strolled across the tracks then simply trampled on and stepped over the second barrier before returning to the forest.

RELATED: Two pregnant elephants are among four killed by speeding trains in two days; video

"Train services on the route were not disrupted as the elephant had left the scene soon after trampling over the barriers," India Today reported. "Locals, however, said that a train went past soon after the mammal left, thereby averting a major disaster."

Unfortunately many elephants in India have been struck by passing trains in the past. This one got lucky.