<PAGE>

                                                                    EXHIBIT 10.4

                                GENENTECH, INC.

                        MAGAININ PHARMACEUTICALS  INC.

                         REGISTRATION RIGHTS AGREEMENT

     This Registration Rights Agreement (the "Agreement") is made effective as
of April 28, 2000, by and among Magainin Pharmaceuticals Inc., a Delaware
corporation (the "Company"); and Genentech Inc., a Delaware corporation, as the
purchaser (the "Purchaser") of Series A Preferred Stock and Common Stock of the
Company under the Stock Purchase Agreement of even date herewith (the "Purchase
Agreement").

                                   RECITALS
                                   --------

     The obligations of the Company and the Purchaser under the Purchase
Agreement are conditioned, among other things, upon the execution and delivery
of this Agreement by the Company and the Purchaser.

                                   AGREEMENT
                                   ---------

     NOW, THEREFORE, in consideration of the mutual promises and covenants
hereinafter set forth, the parties hereto agree as follows:

                                   ARTICLE 1

                              Certain Definitions

     As used in this Agreement, the following terms shall have the following
respective meanings:

     "Certificate of Designations" shall mean the Certificate of Designations,
Preferences and Rights of the Company's Series A Preferred Stock.

     "Commission" shall mean the Securities and Exchange Commission or any other
Federal agency at the time administering the Securities Act.

     "Common Shares" shall mean all the shares of Common Stock issued and
transferred to Purchaser pursuant to Section 1.03 of the Purchase Agreement.

     "Common Stock" shall mean the Company's common stock, par value $.002 per
share.
<PAGE>

     "Conversion Stock" shall mean the Common Stock issued or issuable pursuant
to conversion of the Preferred Stock.

     "Exchange Act" shall mean the Securities Exchange Act of 1934, as amended,
or any similar Federal rule or statute and the rules and regulations of the
Commission thereunder, all as the same shall be in effect from time to time.

     "Holder" means the Purchaser holding Registrable Securities, or any person
holding Registrable Securities to whom the rights under this Agreement have been
transferred in accordance with Section 5.10 hereof.

     "Initiating Holders" means any Holder or Holders who, in the aggregate,
hold not less than 50% of the Registrable Securities (including Preferred Stock
then by its terms convertible into Conversion Stock) outstanding.

     "Preferred Stock" shall mean the Series A Preferred Stock of the Company.

     "Registrable Securities" means:

          (i)   the Common Stock issued on conversion of Preferred Stock
          pursuant to paragraph 5(a) of the Certificate of Designations;

          (ii)  the Common Shares;

          (iii) the Common Stock issued on automatic conversion of Preferred
          Stock pursuant to paragraph 5(f) of the Certificate of Designations in
          the First Conversion Period (as defined in the Certificate of
          Designations) at the earlier of (A) the date that either the holders
          of the Preferred Stock or the Company exercise their right to convert
          Preferred Shares into Common Stock in the First Conversion Period
          pursuant to paragraph 5(a) of the Certificate of Designations and (B)
          November 10, 2006;

          (iv)  the Common Stock issued on automatic conversion of Preferred
          Stock pursuant to paragraph 5(f) of the Certificate of Designations in
          the Second Conversion Period (as defined in the Certificate of
          Designations) at the earlier of (A) the date that either the holders
          of the Preferred Stock or the Company exercise their right to convert
          Preferred Shares into Common Stock in the Second Conversion Period
          pursuant to paragraph 5(a) of the Certificate of Designations and (B)
          June 30, 2009;
<PAGE>

          (v) any Common Stock of the Company issued or issuable in respect of
          the foregoing upon any conversion, stock split, stock dividend,
          recapitalization, or similar event;  provided, however, that
          securities listed in (i)-(v) above shall only be treated as
          Registrable Securities if and so long as they have not been registered
          or sold to or through a broker or dealer or underwriter in a public
          distribution or a public securities transaction.

     The terms "register," "registered" and "registration" refer to a
registration effected by preparing and filing a registration statement in
compliance with the Securities Act, and the declaration or ordering of the
effectiveness of such registration statement.

     "Registration Expenses" shall mean all expenses, except as otherwise stated
below, incurred by the Company in complying with Sections 5.01, 5.02 and 5.03
hereof, including without limitation, all registration, qualification and filing
fees, printing expenses, escrow fees, fees and disbursements of counsel for the
Company, blue sky fees and expenses, the expense of any special audits incident
to or required by any such registration (but excluding the compensation of
regular employees of the Company which shall be paid in any event by the
Company).  Registration Expenses shall also include the fees and disbursements
for one special counsel to the selling stockholders.

     "Restricted Securities" shall mean the securities of the Company required
to bear the legends set forth in Article 3 hereof.

     "Rule 144" shall mean Rule 144 as promulgated by the Commission under the
Securities Act, as such Rule may be amended from time to time, or any similar
successor rule that may be promulgated by the Commission.

     "Rule 145" shall mean Rule 145 as promulgated by the Commission under the
Securities Act, as such Rule may be amended from time to time, or any similar
successor rule that may be promulgated by the Commission.

     "Securities Act" shall mean the Securities Act of 1933, as amended, or any
similar Federal rule or statute and the rules and regulations of the Commission
thereunder, all as the same shall be in effect from time to time.

     "Selling Expenses" shall mean all underwriting discounts, selling
commissions and stock transfer taxes applicable to the securities registered by
the Holders and, except as set forth in Registration Expenses, all fees and
disbursements of counsel for any Holder.
<PAGE>

                                   ARTICLE 2

                        Restrictions on Transferability

     The Preferred Stock, the Conversion Stock, the Common Shares and any other
securities of the Company issued in respect of such stock upon any stock split,
stock dividend, recapitalization, merger, or similar event, shall not be sold,
assigned, transferred or pledged except upon the conditions specified in this
Agreement, which conditions are intended to ensure compliance with the
provisions of the Securities Act.  Each Holder or transferee will cause any
proposed purchaser, assignee, transferee, or pledgee of any such shares held by
the Holder or transferee to agree to take and hold such securities subject to
the restrictions and upon the conditions specified in this Agreement, including
without limitation the restrictions set forth in Article 4.

                                   ARTICLE 3

                               Restrictive Legend

     Each certificate representing the Preferred Stock, the Conversion Stock,
the Common Shares or any other securities of the Company issued in respect of
such stock upon any stock split, stock dividend, recapitalization, merger, or
similar event, shall (unless otherwise permitted by the provisions of Article 4
below) be stamped or otherwise imprinted with legends in substantially the
following form (in addition to any legends required by agreement or by
applicable state securities laws):

     THE SHARES REPRESENTED BY THIS CERTIFICATE HAVE NOT BEEN REGISTERED UNDER
     THE SECURITIES ACT OF 1933, AS AMENDED, AND HAVE BEEN ACQUIRED FOR
     INVESTMENT AND NOT WITH A VIEW TO, OR IN CONNECTION WITH, THE SALE OR
     DISTRIBUTION THEREOF.  SUCH SHARES GENERALLY MAY NOT BE SOLD OR TRANSFERRED
     IN THE ABSENCE OF SUCH REGISTRATION UNLESS THE COMPANY RECEIVES AN OPINION
     OF COUNSEL REASONABLY ACCEPTABLE TO IT STATING THAT SUCH SALE OR TRANSFER
     IS EXEMPT FROM THE REGISTRATION AND PROSPECTUS DELIVERY REQUIREMENTS OF
     SAID ACT.

     SUCH SHARES ARE SUBJECT TO RESTRICTIONS ON SALE, ASSIGNMENT OR TRANSFER
     PURSUANT TO THE TERMS OF A REGISTRATION RIGHTS AGREEMENT BETWEEN THE
     COMPANY AND THE STOCKHOLDER, A COPY OF WHICH IS ON FILE WITH
<PAGE>

     THE SECRETARY OF THE COMPANY. SUCH SHARES MAY NOT BE SOLD, TRANSFERRED,
     ASSIGNED, PLEDGED OR HYPOTHECATED OTHER THAN IN COMPLIANCE WITH SUCH
     REGISTRATION RIGHTS AGREEMENT.

     Each Holder consents to the Company making a notation on its records and
giving instructions to any transfer agent of its capital stock in order to
implement the restrictions on transfer established in this Agreement.

                                   ARTICLE 4

                          Notice of Proposed Transfers

     The holder of each certificate representing Restricted Securities by
acceptance thereof agrees to comply in all respects with the provisions of this
Article 4.  Without in any way limiting the immediately preceding sentence, no
sale, assignment, transfer or pledge of Restricted Securities shall be made by
any holder thereof to any person unless such person shall to the extent such
Restricted Securities shall continue to be Restricted Securities after such
sale, assignment, transfer or pledge, agree in writing to be bound by the
limitations of this Article 4.  Prior to any proposed sale, assignment, transfer
or pledge of any Restricted Securities, unless there is in effect a registration
statement under the Securities Act covering the proposed transfer, the holder
thereof shall give written notice to the Company of such holder's intention to
effect such transfer, sale, assignment or pledge.  If requested by the Company,
the holder shall also provide, either (i) a written opinion addressed to the
Company of legal counsel who shall be, and whose legal opinion shall be,
reasonably satisfactory to the Company, to the effect that the proposed transfer
of the Restricted Securities may be effected without registration under the
Securities Act, or (ii) a "no action" letter from the Commission to the effect
that the transfer of such securities without registration will not result in a
recommendation by the staff of the Commission that action be taken with respect
thereto, whereupon the holder of such Restricted Securities shall be entitled to
transfer such Restricted Securities in accordance with the terms of the notice
delivered by the holder to the Company; provided, however, that the Company
shall not request an opinion of counsel or "no action" letter with respect to
(i) a transfer not involving a change in beneficial ownership, (ii)  a
transaction involving the distribution without consideration of Restricted
Securities by a holder that is (A) a partnership to its partners or retired
partners in proportion to their partnership interests, (B) a corporation to its
majority owned subsidiaries or affiliates or (C) a limited liability company to
its members or former members in accordance with their interest in the limited
liability company; or (iii) a transaction involving the transfer without
consideration of Restricted Securities by
<PAGE>

an individual holder during such holder's lifetime by way of gift or on death by
will or intestacy.  Each certificate evidencing the Restricted Securities
transferred as above provided shall bear, except if such transfer is made
pursuant to Rule 144 under the Securities Act, the appropriate restrictive
legend set forth in Article 3 above, except that such certificate shall not bear
such restrictive legend if in the opinion of counsel for such holder and counsel
for the Company such legend is not required in order to ensure compliance with
any provision of the Securities Act.

                                   ARTICLE 5

                                 Registration

     Section 5.1.  Requested Registration.

       (a)  Request for Registration.  In case the Company shall receive from
Initiating Holders a written request that the Company effect any registration
with respect to shares of Registrable Securities, the Company will:

            (i)   promptly give written notice of the proposed registration to
     all other Holders; and

            (ii)  as soon as practicable, use its best efforts to effect such
     registration (including, without limitation, appropriate qualification
     under applicable state securities laws and appropriate compliance with
     applicable regulations issued under the Securities Act and any other
     governmental requirements or regulations) as may be so requested and as
     would permit or facilitate the sale and distribution, though negotiated,
     underwritten or other transactions or through a combination of such methods
     of sale at the election of the Initiating Holders, of all or such portion
     of such Registrable Securities as are specified in such request, together
     with all or such portion of the Registrable Securities of any Holder or
     Holders joining in such request by delivering a written notice to such
     effect to the Company within 20 days after the date of such written notice
     from the Company; provided that the Company may, once in any twelve month
     period, delay such registration for a period not to exceed ninety (90) days
     if the board of directors of the Company determines that it would be
     detrimental to the Company to effect such registration in a timely manner.

     Notwithstanding the foregoing, the Company shall not be obligated to take
any action to effect or complete any such registration pursuant to this Section
5.01:
<PAGE>

                  (A)  During the period starting with the date ninety (90) days
          prior to the Company's estimated date of filing of, and ending on the
          date sixty (60) days immediately following the effective date of, any
          registration statement pertaining to securities of the Company (other
          than a registration of securities in a Rule 145 transaction or with
          respect to an employee benefit plan), provided that the Company gives
          notice of its intention to file such registration statement to the
          Initiating Holders within thirty (30) days of their request for
          registration; and provided further that the Company is actively
          employing in good faith all reasonable efforts to cause such
          registration statement to become effective; however, the Company may
          not delay a requested registration under this paragraph if the
          Company's registration statement will include no equity securities or
          securities convertible into equity securities and the requested
          registration will not be part of an underwritten public offering; or

                  (B)  After the Company has effected two registrations pursuant
          to this subsection 5.01(a); provided that any registration request
          that (i) is delayed by the Company pursuant to the immediately
          preceding paragraph (A) or pursuant to clause 5.01(a)(ii) or (ii) does
          not result in a registration being effected will not count towards the
          two registration limit in this paragraph (B).

     Subject to the foregoing clauses, the Company shall file a registration
statement covering the Registrable Securities so requested to be registered as
soon as practicable after receipt of the request or requests of the Initiating
Holders.

     (b)  Underwriting.  If the registration pursuant to Section 5.01 is
effected through a firm commitment underwritten public offering at the election
of the Initiating Holders, the underwriters selected must be reasonably
acceptable to the Initiating Holders.  The Company shall advise the Holders as
part of the notice given pursuant to Section 5.01(a)(i) that the right of any
Holder to registration pursuant to Section 5.01 shall be conditioned upon such
Holder's participation in the underwriting arrangements required by this Section
5.01, and the inclusion of such Holder's Registrable Securities in the
underwriting to the extent requested shall be limited to the extent provided
herein.

     The Company shall, together with all Holders proposing to distribute their
securities through such underwriting, enter into an underwriting agreement in
customary form with the managing underwriter reasonably acceptable to the
Company and a majority in interest of the Initiating Holders.  Notwithstanding
any other provision of this Section 5.01, if the managing underwriter advises
the
<PAGE>

Company in writing that marketing factors require a limitation of the number
of shares to be underwritten, then the Company shall so advise all Holders
requesting to be included in the registration and underwriting and the number of
shares of Registrable Securities that may be included in the registration and
underwriting shall be allocated among all Holders requesting to be included in
the registration and underwriting in proportion, as nearly as practicable, to
the respective amounts of Registrable Securities held by them at the time of
filing the registration statement, provided, however, that in the event of such
limitation on the number of shares to be underwritten, no shares of stock to be
registered for sale by the Company shall be included unless all shares of
Registrable Securities requested by the Purchaser or any Holder to be included
in such underwriting are so included.  No Registrable Securities excluded from
the underwriting by reason of the underwriter's marketing limitation shall be
included in such registration.  To facilitate the allocation of shares in
accordance with the above provisions, the Company or the underwriters may round
the number of shares allocated to any Holder to the nearest 100 shares.  If any
Holder of Registrable Securities disapproves of the terms of the underwriting,
such person may elect to withdraw therefrom by written notice to the Company.

     Section 5.2.  Company Registration.

       (a)  Notice of Registration.  If at any time or from time to time the
Company shall determine to register any of its equity securities, either for its
own account or the account of a Holder (other than pursuant to this Agreement),
the Company will:

            (i)   promptly give to each Holder written notice thereof; and

            (ii)  include in such registration (and any related qualifications
     including compliance with Blue Sky laws), and in any underwriting involved
     therein, all the Registrable Securities specified in a written request or
     requests, made within 20 days after the date of such written notice from
     the Company, by any Holder.

       (b)  Underwriting.  If the registration of which the Company gives notice
is for a registered public offering involving an underwriting, the Company shall
so advise the Holders as a part of the written notice given pursuant to Section
5.02(a)(i).  In such event, the right of any Holder to registration pursuant to
Section 5.02 shall be conditioned upon such Holder's participation in such
underwriting and the inclusion of Registrable Securities in the underwriting
shall be limited to the extent provided herein.
<PAGE>

     All Holders proposing to distribute their securities through such
underwriting shall (together with the Company and the other holders distributing
their securities through such underwriting) enter into an underwriting agreement
in customary form with the managing underwriter selected for such underwriting
by the Company.  Notwithstanding any other provision of this Section 5.02, if
the managing underwriter determines that marketing factors require a limitation
of the number of shares to be underwritten, the managing underwriter may limit
the Registrable Securities to be included in such registration to an amount no
less than 30% of all shares to be included in such offering.  The Company shall
so advise all Holders requesting to be included in the registration and
underwriting and the number of shares of Registrable Securities that may be
included in the registration and underwriting shall be allocated among all the
Holders requesting to be included in the registration and underwriting in
proportion, as nearly as practicable, to the respective amounts of Registrable
Securities held by them at the time of filing the registration statement.   To
facilitate the allocation of shares in accordance with the above provisions, the
Company or the underwriters may round the number of shares allocated to any
Holder to the nearest 100 shares.  If any Holder disapproves of the terms of any
such underwriting, such person may elect to withdraw therefrom by written notice
to the Company.

     Until the second anniversary of the date of this Agreement, in connection
with any firm commitment underwritten offering of the Company's Common Stock
that includes such Holder's Registrable Securities as provided in the previous
paragraph, each Holder agrees that, upon its receipt of a notice from the
Company or the managing underwriters at least thirty (30) days before the
initiation of such offering, it will not sell, make any short sale of, loan,
grant any option for the purchase of, or otherwise dispose of any shares of
Common Stock beneficially owned by it without the prior written consent of such
managing underwriters during the period of time beginning ten (10) days prior to
the date when such managing underwriters expect to initiate such public offering
and ending at a date not to exceed ninety (90) days from the commencement of
such public offering; provided that (i) this obligation shall not apply to any
Holder unless each of the Company's directors and officers enters into a similar
agreement, and (ii) the Holder and its affiliates at such time beneficially own
1% or more of the Company's then outstanding shares of Common Stock.

     Section 5.3.  Registration on Form S-3.

       (a)  Request for Registration.  In case the Company shall receive from
Holders a written request that the Company file a registration statement on Form
S-3 (or any successor form to Form S-3) for a public offering of shares of
<PAGE>

the Registrable Securities and the Company is a registrant entitled to use Form
S-3 to register the Registrable Securities for such an offering, the Company
shall use its best efforts to cause such Registrable Securities to be registered
for the offering on such form and to cause such Registrable Securities to be
qualified in such jurisdictions as such Holder or Holders may reasonably
request.  If such offer is to be an underwritten offering, the underwriters
shall be reasonably acceptable to the Company and a majority in interest of the
Holders.  The Company shall inform the other Holders of the proposed
registration and offer them upon at least 20 days written notice the opportunity
to participate.  In the event the registration is proposed to be part of a firm
commitment underwritten public offering, the substantive provisions of Section
5.01(b) shall be applicable to each such registration initiated under this
Section 5.03.

       (b)  There shall be no limit on the number of registration requests by
Holders pursuant to Subsection 5.03(a).

     Section 5.4.  Subsequent Registration Rights.  The Company shall not enter
into any agreement granting any holder or prospective holder of any securities
of the Company registration rights superior to, or pari passu with, the rights
granted the Purchaser hereunder without the written consent of the holders of at
least a majority of the Registrable Securities.

     Section 5.5.  Expenses of Registration.  All Registration Expenses shall be
borne by the Company.  All Selling Expenses relating to securities registered on
behalf of the Holders and all other registration expenses shall be borne by the
Holders of such securities pro rata on the basis of the number of shares so
registered or proposed to be so registered.

     Section 5.6.  Registration Procedures.  In the case of each registration
effected by the Company pursuant to this Agreement, the Company will keep each
Holder advised in writing as to the initiation of such registration and as to
the completion thereof.  The Company will:

       (a)  Prepare and file with the Commission a registration statement and
such amendments and supplements as may be necessary and use its best efforts to
cause such registration statement to become and remain effective until the
distribution described in the registration statement has been completed;

       (b)  Furnish to the Holders participating in such registration and to the
underwriters of the securities being registered such reasonable number of copies
of the registration statement, preliminary prospectus, final prospectus and such
other documents as such underwriters may reasonably request in order to
facilitate the public offering of such securities.
<PAGE>

       (c)  Promptly register and qualify the securities covered by such
registration statement under such other securities or Blue Sky laws of such
jurisdictions as shall be reasonably requested by the Holders; provided that the
Company shall not be required in connection therewith or as a condition thereto
to qualify to do business or to file a general consent to service of process in
any such states or jurisdictions.

       (d)  Notify each Holder of Registrable Securities covered by such
registration statement at any time when a prospectus relating thereto is
required to be delivered under the Securities Act of the happening of any event
as a result of which the prospectus included in such registration statement, as
then in effect, includes an untrue statement of a material fact or omits to
state a material fact required to be stated therein or necessary to make the
statements therein not misleading in the light of the circumstances then
existing.

       (e)  Use its best efforts to furnish, on the date that such Registrable
Securities are delivered to the underwriters for sale, if such securities are
being sold through underwriters, (i) an opinion, dated as of such date, of the
counsel representing the Company for the purposes of such registration, in form
and substance as is customarily given to underwriters in an underwritten public
offering, addressed to the underwriters, if any, and (ii) a letter dated as of
such date, from the independent certified public accountants of the Company, in
form and substance as is customarily given by independent certified public
accountants to underwriters in an underwritten public offering addressed to the
underwriters.

       (f)  Promptly inform the Holders when any stop order has been issued with
respect to the Registration Statement and use its best efforts to promptly cause
such stop order to be withdrawn, and in any event, within 45 days fo the
issuance of such stop order, amend the Registration Statement in a manner
reasonably expected to obtain the withdrawal of the stop order or file an
additional Registration Statement covering all of the Registrable Securities and
use its best efforts to cause such Registration Statement to become effective as
soon as practicable thereafter.

       (g)  Cause all such Registrable Securities registered pursuant to this
Agreement to be listed on each securities exchange on which similar securities
issued by the Company are then listed.

       (h)  Provide a transfer agent and registrar for all Registrable
Securities registered pursuant to such registration statement and a CUSIP number
for all such Registrable Securities, in each case not later than the effective
date of such registration.
<PAGE>

       (i)  Use its best efforts to comply with all applicable rules and
regulations of the Commission.

     Section 5.7.  Indemnification.

       (a)  The Company will indemnify each Holder, each of its officers,
directors, partners and former partners, and each person controlling such Holder
within the meaning of Section 15 of the Securities Act (each, a "Holder
Indemnitee"), with respect to which registration has been effected pursuant to
this Agreement, against all expenses, claims, losses, damages or liabilities (or
actions in respect thereof), including any of the foregoing incurred in
settlement of any litigation, commenced or threatened, arising out of or based
on any violation by the Company of its representations to or covenants with the
Holders under this Agreement or any untrue statement (or alleged untrue
statement) of a material fact contained in any registration statement,
prospectus, offering circular or other document, or any amendment or supplement
thereto, incident to any such registration, or based on any omission (or alleged
omission) to state therein a material fact required to be stated therein or
necessary to make the statements therein, in light of the circumstances in which
they were made, not misleading, or any violation by the Company of the
Securities Act, the Exchange Act, state securities laws or any rule or
regulation promulgated under such laws applicable to the Company in connection
with any such registration, and the Company will reimburse each such Holder,
each of its officers, directors, partners and former partners and each person
controlling such Holder within the meaning of Section 15 of the Securities Act,
for any legal and any other expenses reasonably incurred, as such expenses are
incurred, in connection with investigating, preparing or defending any such
claim, loss, damage, liability or action; provided, however, that the Company
shall not be liable in any case to the extent that any such loss, claim, damage
or liability arises out of or is based upon (a) any untrue statement (or alleged
untrue statement) or omission (or alleged omission) made in such registration
statement, prospectus, offering circular or other document, or any amendment or
supplement thereto, in reliance upon and in conformity with information
furnished by any such Holder Indemnitee to the Company for use in the
preparation thereof (which shall include, without limitation, the information
about the Holder set forth in the registration statement and the plan of
distribution section of the registration statement, if any) or (b) a violation
by the Holder Indemnitee of its representations to or covenants with the Company
under this Agreement.

       (b)  Each Holder will, if Registrable Securities held by such Holder are
included in the securities as to which such registration is being effected,
indemnify the Company, each of its directors and officers, each person who
<PAGE>

controls the Company within the meaning of Section 15 of the Securities Act, and
each other holder of the Company's securities covered by such registration
statement, each of such other holder's, officers, directors, partners and former
partners and each person controlling such other holder within the meaning of
Section 15 of the Securities Act, against all claims, losses, damages and
liabilities (or actions in respect thereof) arising out of or based on any
violation by the Holder of its representations to or covenants with the Company
under this Agreement or any untrue statement (or alleged untrue statement) of a
material fact contained in any such registration statement, prospectus, offering
circular or other document, or any omission (or alleged omission) to state
therein a material fact required to be stated therein or necessary to make the
statements therein not misleading, or any violation by the Holder of the
Securities Act, the Exchange Act, state securities laws or any rule or
regulation promulgated under such laws applicable to the Holder, and will
reimburse the Company, such other holders, such directors, officers, partners or
control persons for any legal or any other expenses reasonably incurred, as such
expenses are incurred, in connection with investigating or defending any such
claim, loss, damage, liability or action, but only to the extent that such
untrue statement (or alleged untrue statement) or omission (or alleged omission)
is made in such registration statement, prospectus, offering circular or other
document in reliance upon and in conformity with written information furnished
to the Company by an instrument duly executed by such Holder and stated to be
specifically for use therein (including, without limitation, information about
the Holder set forth in the registration statement and the plan of distribution
section of the registration statement, if any).  Notwithstanding the foregoing,
the liability of each Holder under this Section 5.07(b) shall be limited to an
amount equal to the amount by which the aggregate proceeds from the offering
received by such Holder exceeds the amount paid by such Holder in connection
with such registration.

       (c)  Each party entitled to indemnification under this Section 5.07 (the
"Indemnified Party") shall give notice to the party required to provide
indemnification (the "Indemnifying Party") promptly after such Indemnified Party
has actual knowledge of any claim as to which indemnity may be sought, and shall
permit the Indemnifying Party to assume the defense of any such claim or any
litigation resulting therefrom, provided that counsel for the Indemnifying
Party, who shall conduct the defense of such claim or litigation, shall be
approved by the Indemnified Party (whose approval shall not unreasonably be
withheld), and the Indemnified Party may participate in such defense at such
party's expense, and provided further that the failure of any Indemnified Party
to give notice as provided herein shall not relieve the Indemnifying Party of
its obligations under this Agreement except to the extent the failure to give
such notice is materially prejudicial to an Indemnifying Party's ability to
defend such action and provided further, that the Indemnifying Party shall not
assume the defense for matters as to
<PAGE>

which there is a conflict of interest.  No Indemnifying Party, in the defense of
any such claim or litigation, shall, except with the consent of each Indemnified
Party (whose consent shall not be unreasonably withheld), consent to entry of
any judgment or enter into any settlement which does not include as an
unconditional term thereof the giving by the claimant or plaintiff to such
Indemnified Party of a release from all liability in respect to such claim or
litigation.

       (d)  If the indemnification provided for in this Section 5.07 is
applicable by its terms but is held by a court of competent jurisdiction to be
unavailable to an Indemnified Party with respect to any expense, claim, loss,
damage or liability referred to herein, then the Indemnifying Party, in lieu of
indemnifying such Indemnified Party hereunder, shall contribute to the amount
paid or payable by such Indemnified Party as a result of such expense, claim,
loss, damage or liability in such proportion as is appropriate to reflect the
relative fault of the Indemnifying Party on the one hand and of the Indemnified
Party on the other in connection with the statements or omissions that resulted
in such expense, claim, loss, damage or liability as well as any other relevant
equitable considerations.   The relative fault of the Indemnifying Party and of
the Indemnified Party shall be determined by reference to, among other things,
whether the untrue or alleged untrue statement of a material fact or the
omission or alleged omission to state a material fact that resulted in such
expense, claim, loss, damage or liability relates to information supplied by the
Indemnifying Party or by the Indemnified Party and the parties' relative intent,
knowledge, access to information and opportunity to correct or prevent such
statement or omission; provided that in no event shall any indemnity
contribution by a Holder under this Section 5.07(d) exceed the gross proceeds
from the offering received by the Holder.

       (e)  The obligations of the Company and Holders under this Section 5.07
shall survive completion of any offering of Registrable Securities in a
registration statement and the termination of this Agreement.

     Section 5.8.  Information by Holder.  The Holders of Registrable Securities
included in any registration shall furnish to the Company such information
regarding such Holders, the Registrable Securities held by them and the
distribution proposed by such Holders as the Company may request in writing and
as shall be required in connection with any registration referred to in this
Agreement.  Such Holder further agrees to notify the Company promptly (i) of the
sale of all of such Holder's Registrable Securities and (ii) in writing of any
material changes in the information set forth in the Registration Statement
relating to such Holder or its proposed distribution, or of any supplemental
information required to be included in the Registration Statement relating to
the Holder or its proposed distribution.
<PAGE>

     Section 5.9.  Rule 144 Reporting.  With a view to making available the
benefits of certain rules and regulations of the Commission which may at any
time permit the sale of the Restricted Securities to the public without
registration, the Company agrees to use its best efforts to:

       (a)  Make and keep public information available, as those terms are
understood and defined in Rule 144 under the Securities Act, at all times (the
Company being currently subject to the reporting requirements of the Securities
Act and the Exchange Act);

       (b)  File with the Commission in a timely manner all reports and other
documents required of the Company under the Securities Act and the Exchange Act;
and

       (c)  So long as a Holder owns any Restricted Securities, to furnish to
the Holder forthwith upon request a written statement by the Company as to its
compliance with the reporting requirements of said Rule 144, a copy of the most
recent annual or quarterly report of the Company, and such other reports and
documents of the Company and other information in the possession of or
reasonably obtainable by the Company as the Holder may reasonably request in
availing itself of any rule or regulation of the Commission allowing the Holder
to sell any such securities without registration.

     Section 5.10.  Transfer of Registration Rights.  The rights granted Holders
under this Article 5 may be assigned to a transferee or assignee, in connection
with any transfer or assignment of Registrable Securities (including Preferred
Stock convertible into Registrable Securities) by the Holder provided that: (i)
such transfer is otherwise effected in accordance with applicable securities
laws and the terms of this Agreement, (ii) such assignee or transferee acquires
at least 50,000 shares of Registrable Securities from the transferor, (iii)
written notice is promptly given to the Company stating the name and address of
the transferee or assignee and identifying the securities with respect to which
such rights are being transferred or assigned and (iv) such assignee or
transferee agrees to be bound by the provisions of this Agreement.

     Section 5.11.  Termination of Registration Rights.  The right of any Holder
to inclusion in any registration pursuant to Article 5 shall terminate on such
date as all shares of Registrable Securities held by such Holder may immediately
be sold under Rule 144 during any 90-day period.

     Section 5.12.  Disposition of Registrable Securities.  Each Holder agrees
not to, directly or indirectly, offer, sell (including sell short), pledge,
transfer or otherwise dispose of (or solicit any offers to buy, purchase or
otherwise acquire or
<PAGE>

take a pledge of) any Registrable Securities that have been registered except in
compliance with the Securities Act, and the rules and regulations promulgated
thereunder. Without limitation of the foregoing, each Holder agrees not to make
any sale of Registrable Securities under the registration statement without
effectively causing the prospectus delivery requirements under the Securities
Act to be satisfied.

                                   ARTICLE 6

                         Financial Information Rights

       (a)  If the Company should no longer be subject to the reporting
requirements of the Exchange Act, the Company will provide the following reports
to each Holder:

            (i)   As soon as practicable after the end of each fiscal year, and
     in any event within 120 days after the end of each such fiscal year,
     consolidated balance sheets of the Company and its subsidiaries, if any, as
     of the end of such fiscal year, and consolidated statements of operations
     and consolidated statements of cash flows and stockholders' equity of the
     Company and its subsidiaries, if any, for such year, prepared in accordance
     with generally accepted accounting principles, all in reasonable detail and
     audited by independent public accountants of national standing selected by
     the Company, and a capitalization table in reasonable detail for such
     fiscal year; and

            (ii)  As soon as practicable after the end of the first, second and
     third quarterly accounting periods in each fiscal year of the Company and
     in any event within 45 days thereafter, a consolidated balance sheet of the
     Company and its subsidiaries, if any, as of the end of each such quarterly
     period, and consolidated statements of operations and consolidated
     statements of cash flows of the Company and its subsidiaries, if any, for
     such period and for the current fiscal year to date, prepared in accordance
     with generally accepted accounting principles (other than accompanying
     notes), subject to changes resulting from year-end audit adjustments.

       (b)  If the Company should no longer be subject to the reporting
requirements of the Exchange Act, the Company will provide the following
information to each Holder:
<PAGE>

            (i)   At least 30 days prior to the beginning of each fiscal year, a
     budget as adopted by the Company's Board of Directors for the fiscal year;
     and

            (ii)  As soon as practicable after the end of the first and second
     month of each quarterly accounting period, a consolidated balance sheet of
     the Company and its subsidiaries (if any), as of the end of each such
     monthly period, and consolidated statements of operations and consolidated
     statements of cash flows of the Company and its subsidiaries (if any), for
     such periods and for the current quarter to date, prepared in accordance
     with generally accepted accounting principles (other than accompanying
     notes), subject to changes resulting from quarter-end and year-end
     adjustments.

            (iii) The Company shall permit each Holder, at such Holder's
     expense, to visit and inspect the Company's properties, to examine its
     books and records and to discuss the Company's affairs, finances and
     accounts with the Company's management, all at such reasonable times as may
     be requested by such Holder.

       (c)  The rights granted pursuant to paragraph (b) of Article 6 may be
assigned to any transferee who acquires at least 50,000 shares of Registrable
Securities, so long as such transferee agrees in writing to be bound by the
provisions of paragraph (d) of Article 6.

       (d)  The Purchaser or transferee of rights under this Article 6
acknowledges and agrees that any information obtained pursuant to this Article 6
which may be considered nonpublic information will be maintained in confidence
by the Purchaser or transferee and will not be utilized by the Purchaser or
transferee in connection with purchases or sales of the Company's securities
except in compliance with applicable state and Federal securities laws.

                                   ARTICLE 7

                             Amendment and Waiver

     Except as otherwise provided above, additional parties may be added to this
Agreement, any provision of this Agreement may be amended or the observance
thereof may be waived (either generally or in a particular instance and either
retroactively or prospectively), only with the written consent of the Company
and the Holders of a majority of the Registrable Securities (including Preferred
Stock convertible into Registered Securities) then outstanding.  Any
<PAGE>

amendment or waiver effected in accordance with Article 7, shall be binding upon
the Purchaser, each Holder of Registrable Securities at the time outstanding,
each future holder of any of such securities, and the Company.

                                   ARTICLE 8

                                 Miscellaneous

     Section 8.1.  Governing Law.  This Agreement shall be governed in all
respects by the internal laws of the State of New York without regard to
conflict of laws provisions.

     Section 8.2.  Entire Agreement.  This Agreement constitutes the full and
entire understanding and Agreement among the parties regarding the matters set
forth herein.  Except as otherwise expressly provided herein, the provisions
hereof shall inure to the benefit of, and be binding upon the successors,
assigns, heirs, executors and administrators of the parties hereto.

     Section 8.3.  Notices, Etc..  All notices and other communications required
or permitted hereunder shall be in writing and shall be mailed by registered or
certified mail, postage prepaid, or otherwise delivered by facsimile
transmission, by hand or by messenger, addressed:

       (a)   if to the Company, to:

               Magainin Pharmaceuticals Inc.
               5110 Campus Drive
               Plymouth Meeting, PA 19462
               Attn: Michael R. Dougherty
               Fax:  (610) 941-5399

     with a copy to:

               Morgan, Lewis & Bockius LLP
               1701 Market Street
               Philadelphia, PA 19103
               Attn: David R. King, Esq.
               Fax: (215) 963-5299
<PAGE>

       (b)   if to the Purchaser, to:

               Genentech, Inc.
               1 DNA Way
               South San Francisco, CA 94080
               Attn: Stephan Juelsgaard
               Fax:  (650) 952-9881


     with a copy to:

               Davis Polk & Wardwell
               1600 El Camino Real
               Menlo Park, CA 94025
               Attn: Daniel G. Kelly, Jr., Esq.
               Fax: (650) 752-2133

     Each such notice or other communication shall for all purposes of this
Agreement be treated as effective or having been given when delivered if
delivered personally, if sent by facsimile, the first business day after the
date of confirmation that the facsimile has been successfully transmitted to the
facsimile number for the party notified, or, if sent by mail, at the earlier of
its receipt or 72 hours after the same has been deposited in a regularly
maintained receptacle for the deposit of the United States mail, addressed and
mailed as aforesaid.

     Section 8.4.  Delays or Omissions.  No delay or omission to exercise any
right, power or remedy accruing to any Holder, upon any breach or default of the
Company under this Agreement shall impair any such right, power or remedy of
such Holder nor shall it be construed to be a waiver of any such breach or
default, or an acquiescence therein, or of or in any similar breach or default
thereafter occurring; nor shall any waiver of any single breach or default be
deemed a waiver of any other breach or default therefore or thereafter
occurring.  All remedies, either under this Agreement or by law or otherwise
afforded to any Holder, shall be cumulative and not alternative.

     Section 8.5.  Rights.  Unless otherwise expressly provided herein, a
Holder's rights hereunder are several rights, not rights jointly held with any
of the other Holders, if any.

     Section 8.6.  Severability of this Agreement.  In the event that any
provision of this Agreement becomes or is declared by a court of competent
jurisdiction to be illegal, unenforceable or void, this Agreement shall continue
in full force and effect without said provision and the parties agree to replace
such
<PAGE>

provision with a valid and enforceable provision that will achieve, to the
extent possible, the economic, business and other purposes of such provisions;
provided that no such severability shall be effective against a party if it
materially and adversely changes the economic benefits of this Agreement to such
party.

     Section 8.7.  Headings, Etc.  The headings of the Sections of this
Agreement have been inserted for convenience of reference only, are not to be
considered a part hereof, and shall in no way modify or restrict any of the
terms and provisions hereof.

     Section 8.8.  Counterparts; Facsimile.  This Agreement may be executed in
any number of counterparts, and by facsimile, each of which shall be enforceable
against the party or parties actually executing such counterparts, and all of
which together shall constitute one instrument.


                 [Remainder of Page Intentionally Left Blank]
<PAGE>

     IN WITNESS WHEREOF, the parties hereto have executed this Agreement as of
the date first set forth above.

"THE COMPANY"

MAGAININ PHARMACEUTICALS INC.
a Delaware corporation


By:  /s/ Michael R. Dougherty
   -----------------------------------
   Name: Michael R. Dougherty
   Title: President and Chief Executive Officer

"THE PURCHASER"

GENENTECH, INC.
a Delaware Corporation



By:  /s/ Arthur D. Levinson
   ------------------------------------
   Name:  Arthur D. Levinson, Ph.D.
   Title:  Chairman and Chief Executive Officer