Flight Crew Flight Instructor; Flight Crew Commercial; Flight Crew Multiengine; Flight Crew Instrument
Flight Crew Last 90 Days 80; Flight Crew Total 1900; Flight Crew Type 450
Aircraft Equipment Problem Less Severe
Air Traffic Control Provided Assistance; Flight Crew Returned To Departure Airport; General Declared Emergency
Aircraft
[We] taxied to the runway for departure. When out of usable runway; my student selected gear up. The gear did not appear to move and there was no low-frequency noise of the gear pump.  The gear indicator lights continued to show green down and locked.  The 'gear unsafe' light illuminated; indicating a disagreement between the position of the gear selector and the gear itself.... I took the controls and selected gear down and then attempted to bring the gear back up.  There was no movement of the gear this time either....  I told Tower that we were having a problem with our gear and we were going to need to stay in the pattern to troubleshoot.  My biggest worry was that either on the initial selection of 'gear up' or my second attempt we had unlocked the gear and it would collapse when we touched down.  I knew we had three green lights (indicating that the gear was down and locked) but I wasn't willing to trust them completely - the gear system had already let us down once. We did an initial flyby of the Tower so that they could check our gear and then orbited east of the field while we spoke to Maintenance on the ground.  After discussion; they asked us to do another flyby but felt that that it would be safe to attempt a landing.... I requested that Tower get the trucks rolling and we performed our flyby.... The landing was uneventful. The gear stayed locked. We taxied back to our maintenance hangar and my student and I debriefed.  Maintenance determined that the squat switch had been improperly installed and the aircraft thought it was still on the ground even after takeoff.  At no time was the gear ever unsafe - it was fully down and locked the entire time.
Narrative 2 contains no additional information.
PA44 Student Pilot raised the gear handle on takeoff; but the gear remained down with three down and locked indications. Instructor Pilot took control of the aircraft; lowered the gear handle and; after a fly-by for visual verification; landed without incident.