Tanya Roberts' longtime partner says he was distraught and confused during his final moments with her ... which may explain why he prematurely told folks she had died.
Lance O'Brien told a photog Tuesday ... when he visited her Sunday at the hospital she was in bad shape -- unresponsive on a ventilator -- but he says when he told her he was there, she sat up and opened her eyes.
This led him to believe she was responding, but he says hospital staff told him it was just a reflex ... and she was "out" shortly afterward. Lance tells us he was beside himself, so he got in the elevator and left.
Lance says Tanya's rep Mike Pingel -- who's driving Lance in this video -- picked him up from the hospital and asked what happened ... and this might help explain her bizarre premature death announcement.
He tells us he responded, "I just said goodbye to Tanya," and that was it ... then he went home and fell asleep, only to wake up later to phone calls about her passing.
Lance seems to be suggesting Mike interpreted his statement as proof Tanya had died, though Pingel also says Lance told him ... "She died in my arms."
Either way, it makes sense in wake of a devastating, tragic moment that there could be a communication breakdown ... and Lance says the ordeal was made all the more difficult due to COVID.
Lance also tells us Tanya had her initial health scare on December 23 -- not Christmas Eve -- but he thought it was just a blood sugar issue and she would be fine.
We broke the story ... Tanya died Monday night at L.A.'s Cedars-Sinai Hospital. Despite the strange story involving her death, she'll be remembered for her long and successful career as a model and actress ... most recently for starring on "That '70s Show" as Midge.
Tanya was 65.