Co-written and first recorded by Tony Wilson (1979).
Hit version by co-writer Randy Vanwarmer (US #4/C&W #71/UK #8 1979).
From the wiki: “‘Just When I Need You Most’ was written by Randy Vanwarmer and Tony Wilson (of Hot Chocolate, ‘Brother Louie‘) in 1977. It first appeared on Wilson’s Catch One album, released three records before his label mate Randy Vanwarmer’s hit version (Tony’s: Bearsville BRK 6985; Randy’s: Bearsville BRK 6988).
“On the Tony Wilson album, Vanwarmer and Wilson are listed as co-writers; on Randy Vanwarmer’s Warmer album there is no mention of Wilson as co-writer.”