A federal judge refused to dismiss a lawsuit claiming that NBC’s “Timeless” is a ripoff of a Spanish TV time travel series.

U.S. District Judge Stephen Wilson, in a ruling issued on Wednesday, denied a motion to dismiss the lawsuit. Sony and other defendants had asked the court to toss the case.

Onza Partners, producers of the Spanish series “El Ministerio del Tiempo,” contend that their storyline was stolen for “Timeless,” in which a trio travels through time to try to stop a criminal trying to alter the course of history.

Wilson wrote that the issue of whether the Spanish TV series and “Timeless” are “substantially similar” is better left to the summary judgment phase of litigation. He wrote that “an examination of more than just the pilots is required” to make such a determination.

He also wrote that Onza’s “well pleaded facts state a plausible claim for an implied contract.”

The lawsuit claims “numerous similarities” between the two shows, including that the antagonist is a suspected double agent. It also points to the presence of a three person team of one woman and two men. In both, the woman has “an academic background (with unorthodox elements) and knowledge of historical accuracy helpful — or crucial — to carrying out the given missions.”

Onza claims that they began negotiating with Sony on a deal for a U.S. version of the series in July, 2015, and even exchanged deal proposals. But on Aug. 26, 2015, Deadline published a release that Eric Kripke and Shawn Ryan were producing a TV pilot titled “Time,” later retitled “Timeless,” for NBC.

“Oddly, at the moment of the August 26, 2015 publication of the Deadline [r]elease, Sony abruptly and without any warning terminated all negotiations relative to Onza’s American version,” the Onza lawsuit claims.

The suit contends that its attorney, David Tenzer, contacted Sony attorneys, one of whom eventually responded that they didn’t “feel that our project violates your client’s rights.”

Onza is represented by Devin McRae and Michael Smarinsky of Early Sullivan Wright Gizer & McRae.