K9 Mark IV

K9 Mark IV was an intelligent robot in the form of a dog that was a companion of Sarah Jane Smith and subsequently Luke Smith, also serving as their beloved pet. He was a gift from the Tenth Doctor to Sarah Jane, the rebuilt self and replacement of K9 Mark III.

Origins
K9 Mark IV was the fourth in the line of K9 robots. He was based upon the original K9 Mark I designed by Professor Frederick Marius in 5000 and which travelled with the Fourth Doctor and Leela. (TV: The Invisible Enemy) Sometime after she had stopped travelling with him, the Doctor had gifted K9 Mark III, an improved version of the first two K9s, to his former companion, Sarah Jane Smith. (TV: A Girl's Best Friend) Before that, the Mark III had travelled with the Fourth Doctor. (PROSE: Inter-Galactic Cat)

At some point after leaving Mark the III behind, the Doctor began constructing a K9 Mark IV. The Eighth Doctor mentioned the Mark IV when he met Sarah Jane in 1996, indicating that the effort in constructing the Mark III had been "nothing" in comparison to the Mark IV. (PROSE: Interference - Book Two)

The Mark III was eventually destroyed fighting off a Krillitane invasion in 2007 with Sarah Jane and the Tenth Doctor. The Doctor presented Mark IV to Sarah Jane as a replacement by leaving him behind when his TARDIS dematerialised. K9 claimed to be the same unit as Mark III, explaining to Sarah Jane that the Doctor had "rebuilt" him with "new omniflexible hyperlink capabilities". (TV: School Reunion)

Stabilising a black hole
Sarah Jane wasn't able to enjoy Mark IV's company for long. Soon after being presented to her, K9 Mark IV was forced to enter deep space in order to stabilise a dangerous artificial black hole in space which had been created in Switzerland. She lamented being all alone. K9 was able to maintain occasional communication with Sarah Jane via a cabinet with a space-time link when the orbit of the black hole intersected with that of Earth. (TV: Invasion of the Bane)

At times he was capable of returning to Earth briefly and did so on several later occasions in order to render vital assistance. He fought Mr Smith in pitched battle to allow Sarah Jane to upload the Armageddon virus. (TV: The Lost Boy) He was later called back in order to quickly upload the TARDIS' base code to Mr Smith, thereby assisting the Tenth Doctor in returning Earth to its correct location in space. (TV: Journey's End) Some time later, Rahnius Slitheen attempted to steal him as part of a revenge plot against Sarah Jane. K9 banished the Slitheen, after reversing one of its attacks. After each of these events, K9 went back into space to continue monitoring the black hole. (TV: From Raxacoricofallapatorius with Love)

Returning to Sarah Jane
Later, Sarah Jane contacted K9 to arrange the transferr of the black hole into fuel for Eve's ship. With his mission complete, K9 then triumphantly returned to 13 Bannerman Road to stay. He greeted Mr Smith — who held something of a resentment towards him — and had a photograph taken with Luke Smith, Clyde Langer and Rani Chandra. In 2059, Rani still had that photo. (TV: The Mad Woman in the Attic)

He and Mr Smith continued something of a rivalry, especially during the gang's attempt to spy on Sarah Jane's date with Peter Dalton. K9 subsequently exposed the gang's activities to Sarah Jane, when Sarah Jane asked K9 to repeat what Rani had specifically told him not to tell her. When a Travast Polong got loose in Bannerman Road, K9 pursued it, to the horror of Sarah Jane and Luke, who had been trying to hide him from the visiting Peter. Luke tried to explain that K9 was just a Japanese robot toy with pre-programmed phrases.

Clyde smuggled K9 into Sarah Jane's wedding to check for anything unusual. When the Tenth Doctor interrupted the ceremony, K9 immediately recognised his master and came out of hiding to greet him, only to start warning Sarah Jane of danger as the Trickster also arrived. The Trickster trapped K9 in the same second as the gang and the Doctor, with the dog identifying their current location as "nowhere, nowhen". After witnessing the TARDIS failing to materialise, the Doctor ordered K9 to keep an eye out for it. After his exposure to the TARDIS' outer shell, K9 identified that Clyde was carrying Artron energy. When time began moving again, K9 rushed to Sarah Jane along with the gang. He later comforted her in the attic and identified the escalating of a temporal flux, indicating the TARDIS’ arrival. (TV: The Wedding of Sarah Jane Smith)

At one point Clyde made a drawing of K9, which was Luke later had animated by alien energy to defeat the Abomination. (TV: Mona Lisa's Revenge)

K9 assisted in tracking down a pair of Slitheen, locating them with his "olfactory sensors". That evening, Clyde kidnapped K9 from the attic to use him to cheat his biology test, much to the gratitude of Mr Smith who wanted a break from “the dog”. Secreted under Clyde’s desk at school, K9 used an earpiece to tell Clyde the answers and was nearly discovered until the teacher was distracted by a Rakweed plant. When the Rackweed began to spread across London, K9 was able to save Clyde and Rani from spores using his laser, though had insufficient power to do so again, and later triggered the school alarm to destroy them. He passed on the frequency of the alarm to Mr Smith, who was able to replicate it on devices across London to destroy the plants. K9 was in the attic when the Blathereen arrived to seek revenge for plants’ destruction and exploded when Mr Smith replicate the frequency to destroy the Rakweed in their stomachs. (TV: The Gift)

Moving to Oxford with Luke
When Luke was trapped in a nightmare by the Nightmare Man, K9, with the help of a piece of sentient concrete and extra power from Mr Smith, managed to transport himself into Luke's nightmare to communicate with him. K9 was attacked by the Nightmare Man to break the connection, but Sarah Jane was able to reactivate him. After the crisis had passed, she told K9 that he would be going with Luke to Oxford and K9 promised to look after him. As he parted ways with Mr Smith, K9 deemed him “adequate company” and took the Xylock’s reminder that K9 could always contact him as indicative that Mr Smith would miss him. He rode in the front seat of Luke’s car as they left, telling Sarah Jane he would see her at Christmas. (TV: The Nightmare Man)

K9 stayed in Oxford when Luke responded to Clyde's message about Sarah Jane leaving, though still assisted virtually by video call. He traced Clyde’s phone to space and remotely reset Ruby White's artificial intelligence, Mr White, using it to free Mr Smith from its control and rescue Clyde. He, Mr Smith and Mr White collaborated on Luke’s plan to generate a holographic meteor attack across the world to overwhelm Ruby with humanity’s emotions. Afterwards K9 called the attic via Mr Smith, who finally admitted K9 was “not so bad” in recognition of his help. (TV: Goodbye, Sarah Jane Smith)

K9 stayed in Oxford when Luke returned home for a visit in 2011, as he was currently backing up the entire Bodleian Library, but Luke had taken his whistle just in case. Luke later used the whistle to contact Mr Smith in morse code, in order to pass on a message to Clyde and Rani. (TV: The Man Who Never Was)

Travelling in time
At some point after he left Sarah Jane, K9 was fitted with a vortex manipulator circuit and Temporal Positioning System, allowing him to travel through time with ease. When a temporal crisis swept through the universe, causing TARDIS travel to become little short of impossible for all of the Doctor's incarnations, K9 acted as a go-between coordinating the effort to absorb vortex energy from Waypoints to bring the TARDISes back online and resolve the crisis. He first encountered the Thirteenth Doctor and Yasmin Khan at the UNIT HQ laboratory, before being tasked by the Doctor with keeping her other incarnations informed. K9 then kept phasing from Waypoint to Waypoint to help with the vortex energy collection. He also helped deal with some alien life-forms that had escaped from the Vault while Jo Grant and John Benton defeated a Cyberman. (GAME: Lost in Time)

Later life
After Sarah Jane's memorial, K9 left with Ace. (WC: Farewell, Sarah Jane)

Personality
Unlike his previous model, this K9 seemed slightly more capable of having and understanding emotion. Such examples are that he said "Affection noted, mistress" after Sarah Jane called him a good dog (TV: Invasion of the Bane) and his constant rivalry with Mr Smith for the best technical support. (TV: The Mad Woman in the Attic - The Nightmare Man) At one point K9 claimed contacting Mr Smith interfered with his “synaptic circuits” which Clyde correctly inferred meant Mr Smith got on his nerves. (TV: The Gift) Another was that he possessed a sense of right and wrong instead of simply obeying orders. For example, when Clyde tried to use K9's knowledge to help him pass a test at school, K9 pointed out it was unethical however eventually complied when Clyde pointed out that bringing an advanced supercomputer to a test did qualify as proving his intellectual superiority over others, thus meeting the literal definition of a test, which K9 deemed “irrefutable logic”. (TV: The Gift)

This K9 could also be extremely literal, such as giving the definition of a test in response to Clyde’s sarcasm and when he noted the Blathereen’s disintegration had been successful despite the entire attic having already been covered by goop from their explosion. (TV: The Gift) Sarah Jane once exploited this by asking him to tell her what Rani had instructed him not to tell her, thus exposing that the gang had followed her. Mr Smith found this aspect of K9’s personality especially irritating, telling him to be quiet when K9 recited the entire definition of their instructions from Clyde to “play nicely.” (TV: The Wedding of Sarah Jane Smith)

Features and improvements
This K9 had a shiny metallic blue paint job and a number of improvements over Mark III including omniflexible hyperlink capabilities (TV: School Reunion) and universal serial bus ports. (TV: The Nightmare Man) Later, though, K9 reverted to his old, dark green colour. (TV: Invasion of the Bane) In his battle with Mr Smith, K9 displayed a teleport facility and utilised a laser weapon similar to the previous K9 models. (TV: The Lost Boy) Upon receiving him, Sarah Jane changed his collar colour to nearly match the pattern on the Fourth Doctor's scarf, the same or identical collar to those worn by the previous K9s. Unlike his previous models, although like K9 Mark 2, K9's eyepiece could glow at night. (TV: The Lost Boy) He also had a compartment in his side, which could hold items, such as the sonic lipsticks and the scanner watch, which were gifts from the Tenth Doctor to Sarah Jane after their last meeting. (TV: Invasion of the Bane)

This K9 displayed improved mobility features. Whereas earlier K9s including Mark III were seen being lifted into, out of, and over things, K9 Mark IV had a hover mode, enabling him to negotiate the stairs in the Smiths' three-storey house and multi-level attic, and to access and egress automobiles on his own. (TV: The Wedding of Sarah Jane Smith, The Gift) Despite these additional features, Clyde was able to kidnap K9 by simply picking him up and K9 still needed someone to hold doors open for him. (TV: The Gift)

K9 displayed the ability to remotely connect to any device, such as a school alarm, (TV: The Gift) even connecting to Mr White via a mobile phone placed next to him despite K9 himself being miles away. (TV: Goodbye, Sarah Jane Smith)

K9 claimed to be able to smell via “psychospore and olfactory sensors”, which he used to trace Slitheen. (TV: The Gift)

K9 claimed that he was shaped like a dog because "the human ego requires a familiar reference point to aid in adjusting to new concepts. Animal forms are comforting to the majority of humans." (PROSE: Housewarming)

SJA appearances
The reason for K9's fleeting appearances in The Sarah Jane Adventures was due to other parties holding the rights to the character, for use in a spin-off TV series, K9, although the character had not been completely forbidden from appearing in The Sarah Jane Adventures. As, in the first episode of the K9 series, K9 Mark I was destroyed in a self-sacrifice and "regenerated" into an entirely redesigned model and the TV series bought the rights to the concept and simply "borrowed" the character and, briefly, original design, with full consent, the rights to the character and design of the original K9 once again belong to the BBC who could use K9 (as per his original design) freely in The Sarah Jane Adventures. His minor appearances up until that time had been simply to be careful not to misuse the rights allowance whilst they were still being decided upon.

Other matters

 * The designation K9 Mark IV never actually appeared in dialogue. Documents packaged with the 1/4 scale Remote Control K9 toy referred to this model as the Mark IIIb, but props in The Sarah Jane Adventures have had the Mark IV designation.
 * K9 Mark IV is the first K9 to have been created to resurrect a previously destroyed model. This was repeated for K9 Mark I, who self-destructed and reformed into a remarkably different new body, K9 Mark 2.