Date: 202101
Local time of day: 1201-1800
Location: ZZZ.Airport, US
Flight conditions: VMC
Weather elements / visibility: 10
Light: Daylight
Aircraft: PA-28R Cherokee Arrow All Series
Operator: FBO
Operating under: Part 91
Flight plan: None
Mission: Training
Flight phase: Landing
Airspace: Class D ZZZ
ATC / advisory: Tower ZZZ
Second aircraft: PA-28 Cherokee/Archer/Dakota/Pillan/Warrior
Reporter organization: FBO
Reporter function: Pilot Flying; Trainee
Reporter qualification: Flight Crew Private
Human factors: Training / Qualification; Communication Breakdown; Situational Awareness
Second reporter function: Instructor; Pilot Not Flying
Anomaly: ATC Issue All Types; Conflict NMAC; Deviation / Discrepancy - Procedural Published Material / Policy
Detector: Person Flight Crew
When detected: In-flight
Result: Flight Crew Took Evasive Action
Contributing factors: Human Factors; Procedure
Primary problem: Procedure

Narrative: In the traffic pattern at ZZZ; my CFI and I were on the right downwind for Runway XXR when we were told to Continue for Runway XXR. We then continued and a few moments later was told to turn right base for XXR. When turning right base we noted traffic; but I didn't think it was a factor at first because we assumed it was for the parallel because we still were told to turn right base.  As we got established on base we saw the traffic was close and my CFI took controls to avoid a mid-air collison. We got no warning from the Tower and later found out that the tower told the other aircraft to continue for Runway XXR. Shortly after the Tower told them to continue for XXR that's when the tower said to turn base. I didn't think that traffic that was on final would be a factor for us and thought it was for Runway XXL. In the future; I think the Tower should be more clear and understand the traffic spacing better because if he did then he could've told us to extend a couple of miles so we could've passed behind the traffic instead of passing in front and coming within 1;000 feet horizontally of each other. I believe the talking between me and my CFI also contributed because maybe we would've heard the call for the other aircraft to continue and could've challenged that with the Tower but even then we still were told to turn base. I believe the tower should've noted the other aircraft and looked at the spacing; and told us this isn't going to work and this near-miss could've been avoided altogether instead we got turned directly into the path of another aircraft.


Second narrative: I was flying with my student in the pattern at ZZZ. When we were downwind; Tower didn't clear us for a touch and go; but told us to continue. We continued downwind and waited for further instructions when Tower then told us to turn base.We turned base. There was some hesitation but then the Controller instructed us to turn directly towards the numbers. At this point; we were on right base unaware we were being turned onto an aircraft that was on final.   Before my students turn for final; I always have them look on final to make sure it is clear of traffic. At this point; I noticed the traffic on the left hand side and saw it on my iPad. I took the controls from my student and climbed to offset to the right where we avoided a near miss collision of about 1;000 feet horizontal distance and 300 feet vertical distance over a densely packed neighborhood of City. We never were told to extend or follow this aircraft.Prior to the Controller telling us to turn base; he had spoken to the aircraft on the straight in final and told them to continue. He realized the aircraft was there; but did not communicate the location and told us to turn base onto him. This situation demonstrates that pilots must exercise extreme vigilance at airports where ATC is so busy to provide clear instructions.The term 'continue' can be vague in that…does it mean we're supposed to fly the pattern as regularly; or are we supposed to continue downwind? In that case; the term 'extend' would make more sense.When I talked to the Controller on the phone later; I was told that this situation occurred due to a late runway switch by the other aircraft. However; in examination of the track log; the aircraft was on a straight in approach. The pilot also called up that they were approaching a point on the approach for XXR.  The Controller didn't acknowledge the mistake that had been made and the possible deadly consequences that could have occurred from this near miss.This is a serious near miss.


Synopsis: Flight instructor and student reported an NMAC occurred in the traffic pattern when Tower Controller cleared them to turn in front of another aircraft on short final to the same runway.