I'd like to preface this with a sort of disclaimer - this isn't really my area of expertise, I've just stumbled over tangentially related subjects in my own research, but I consider myself fairly well read on the subject. I hope I will be able to answer in a reasonably concise way, and please just ask away if you want me to expand on anything.
During most of the 1950's, the Swedish Air Force Administration (a government agency responsible for providing the air force with equipment, weaponry, supplies etc) studied a very large number of possible aircraft designs for future projects, with Saab as the main contractor. Not that there were any real alternatives to Saab - the company had a fairly incestous relationship with the Swedish government (there's a lot of words that could be written about the origins of Saab, enough for an entirely separate question - it's seriously weird). These early studies were more or less speculative and there were no clear specifications or an actual demand for a new aircraft just yet - it was mostly engineers and air force tacticians throwing ideas around to figure out what could work and what would be necessary to demand from a next generation aircraft.
By 1960, series production of the Saab 32 Lansen (a strike aircraft, mainly focused on the role of attacking a Soviet invasion fleet attempting to cross the Baltic Sea) was winding down and production of the Saab 35 Draken (a fighter, designed both for general air superiority and for intercepting high altitude, high speed bombers) was ramping up. Saab only had the capacity to produce one aircraft type at a time, really, and in the 1950's the government had in fact more or less forced the company to abandon the civilian side of its business to focus on military production - there would be no successor to the Saab 90 Scandia. It was time to start thinking about the next generation aircraft. A tentative project specification was drawn up and was ready in February of 1961, followed by a more solid specification and an order to begin prototyping in December of 1961. The specification for the new aircraft were mainly centered a few important requirements.
First, designing and producing new aircraft was rapidly becoming more expensive as technology became more advanced. By the 1960's, and especially after the defense budget of 1958, which would greatly favor the army over the air force (and even more so over the navy) for the following five years, the air force could not see itself demanding new aircraft types every few years, like it had done in the 1940's and 1950's. Thus, the new aircraft was to become a "unity aircraft" (enhetsflygplan, was the term used in Swedish at the time) - the same basic airframe was to be used for both fighter, strike and reconnaissance missions (today, we would call this "multi-role"). In its first version, though, it was to be focused on the strike role - the Draken would fill the fighter role for the immediate future.
Second, the all-important threat for the air force of the 1950's was the nuclear one. During the Cold War, almost all of Sweden was actually situated east of the Iron Curtain, and while the Air Force would do its best to defend both its own bases and civilian population centers, it could not hope to intercept every single bomber from a superpower such as the Soviet Union with the short warning times available and the great numerical superiority the enemy was expected to have. The all-important question for most of the 1950's was thus how to avoid getting the air force destroyed on the ground or unable to fly because the bases were damaged - even a single nuke could wipe out an entire air wing if it was dropped at the right time and the right place. Early on (late 40's, early 50's), the idea was to build fortified underground hangars, protected by dozens of meters of bedrock. This was actually done at five air bases, but it soon turned out that it was both horrifically expensive and probably not as effective as had been initially envisioned (a 1957 research report from the Fortification Authority concluded that it was economically not feasible to build facilities that could withstand a direct hit from the bigger nukes then in service - especially not facilities as big as aircraft hangars). Instead, a 1954 study formulated the idea of dispersed basing, which was then given a go-ahead with the defense budget of 1958. The idea was to disperse the aircraft so much that it would be combat-economically ineffective to try to nuke every base, and that nuclear radiation or runway damage would not make it impossible to operate aircraft. Each base would only house one squadron or maybe even half a squadron (a squadron at this time had 16 pilots and at least 8 aircraft; it was dimensioned to keep 4 aircraft in the air or at highest readiness 24/7). The system was called "Bas 60", and the original plan called for 70 new bases, a number which was then adjusted down a number of times. Because of this new basing system, the 1961 specification called for both short-field capability (initially, the air force asked for the ability to operate from unprepared 500 meter strips) and ease of service in the field.
Furthermore, the new aircraft was supposed to be capable of exceeding Mach 1 at low altitudes and reaching Mach 2 at high altitudes, it was to have a 400 km combat radius while carrying the Robot 04 anti-ship missile (in military Swedish, a missile is called "robot" for historical reasons - it originates with the V-1 and V-2, which were called "robot-bombs" in - while in ordinary Swedish the word means the same thing as it does in English) which had recently entered service on the Lansen, it had to be all-weather capable, and it should mass around 10 tonnes. While some of the 1950's studies had considered the capabilities of carrying nuclear weapons, as far as I have been able to determine there was no such requirement for what, at the time, was called "Project 1500". The Swedish nuclear weapons program was still going strong at the time and earlier studies had definitely considered the need, but for some reason it seems to have fallen out of the specifications by 1961. The reason for the anti-ship focus on both the Lansen and the Viggen was a simple matter of geography - the only conceivable enemy in the short term was the Soviet Union, and the only way they had to get to the greater part of Sweden within a reasonable timeframe was to cross the Baltic Sea. It was seen as a much more economical use of the limited resources available to use a few anti-ship missiles to sink a ship carrying an armored company than to try to use the unguided bombs and rockets that existed at the time to destroy that same company after it had already landed. On top of that, the conscript army would need time to mobilize, and since crossing the Baltic Sea was a matter of less than a day (from Leningrad or the Baltic states) or just a few hours (from East Germany) the air force (and the navy as well as the coastal artillery) needed to buy time in order to allow that to happen.
Saab's aerodynamicists was then left with a pretty difficult problem. The aircraft had to have very good high speed performance for its time, but it also had to be able to handle take-off and landing on extremely short strips, which meant it had to handle well at very low speeds too. These two requirements conflicted with each other. Other aircraft of the same era with similar requirements, such as the American F-111 Aardvark, solved this by introducing variable-geometry wings, which changed the aircraft's aerodynamic properties in flight to optimize it for different airspeeds. Saab and the Air Force Administration, however, rejected this as too expensive and too complicated to maintain in the field (especially with the limited resources expected to be available on the dispersed bases), and instead developed - as far as I know, completely independently - a new aerodynamic concept which became known as the close-coupled canard wing. Saab filed for a patent on it in the US in 1963 (US patent number 3188022 A).
Saab and the Swedish Air Force definitely kept a close eye on what was going on in other countries at the time, but if there's anything that can be said to be characteristic for the Swedish Cold War era military-industrial complex, it's that there's certainly never been any lack of courage to go for unconventional ideas if they were thought to fit the Swedish demands. In the 1950's and 1960's, the memories from World War 2 were still fresh in the minds of politicians and military men - it had turned out that if you were neutral and there was a war going on around you, nobody wanted to sell you any equipment and if you didn't have the strength to back your neutrality before the war, even the vaguest threat of war could be enough to force you to make some very unpleasant concessions, such as those of the Midsummer Crisis of 1941. Hence, the domestic Swedish arms industry was seen as a necessary component of the neutrality or non-alignment, and it became almost a doctrine of its own for the Swedish armed forces to require equipment that was specifically tailored to Swedish needs.
The Viggen is just one example of this. Short-field performance was actually a pretty common requirement of the time (as far as the vision of the threat goes, the Swedish air force was almost certainly influenced by NATO air forces) and led to aircraft such as the aforementioned F-111, the Harrier and a whole bunch of experimental VTOL aircraft, but the combination of short-field performance, maintainability in the field and the focus on an anti-ship role was a rather specific combination that - as far as I know - wasn't seen anywhere else. That odd combination, and the political conviction that a domestic arms industry was necessary, is what led to the Viggen.
e: whoa, thanks for the gold!
Was the development of an indigenous arms industry critical to the concept of neutrality?