Patent Description:
Ibrutinib, chemically <NUM>-[<NUM>(R)-[<NUM>-Amino-<NUM>-(<NUM>-phenoxyphenyl)-<NUM>-pyrazolo[<NUM>,<NUM>-d]pyrimidin-<NUM>-yl]piperidin-<NUM>-yl]-<NUM>-propen-<NUM>-one, compound of Formula (<NUM>):
<CHM>
is a pharmaceutically active compound acting as an oral Bruton's tyrosine kinase (BTK) inhibitor. Ibrutinib is used as a medicament for the treatment of patients with mantle cell lymphoma and for the treatment of chronic lymphocytic leukemia. Ibrutinib is available, e.g., under the brand name Imbuvica®.

Ibrutinib was disclosed in <CIT>. There are several applications and articles describing a process for preparation of Ibrutinib, for example <CIT> or <CIT> or <CIT> or <CIT> or <CIT>or <CIT> by <NPL>, and <NPL>. The processes described in the prior art do not provide Ibrutinib in sufficient purity or contain column purification in purification steps of either Ibritinib or used intermediates. Column purification is not suitable to be used on an industrial scale production.

Hence, there is a need for an improved process for preparing of Ibrutinib. In particular, it would be desirable to have a process which is efficient in terms of yield and chemical purity, cost effective in terms of reagents and reaction conditions, and which is applicable on an industrial scale.

There are also several solid forms described in the prior art, for example solid forms A and C described in <CIT>. The application further describes several solvates of Ibrutinib.

The presented invention relates to a process for preparation of Ibrutinib, compound of Formula <NUM> or a salt thereof,
<CHM>
the process comprising:.

<FIG> depicts the X-Ray Powder Diffractogram (XRPD) of solid form of compound of Formula (<NUM>), Form <NUM>, prepared by the process described in Example <NUM>.

The presented invention relates to a process for preparation of Ibrutinib, compound of Formula <NUM>, or a salt thereof,
<CHM>
the process comprising:.

The reaction between compound of Formula (<NUM>) and Formula (<NUM>) can be performed in a suitable solvent for example <NUM>-methyl tetrahydrofurane or tetrahydrofurane or dichloromethane, preferably dichloromethane is used. In case dichloromethane is not used as a solvent, it is added to the mixture. The reaction is performed in presence of a Lewis acid. The molar ratio between dichloromethane and the compound of Formula (<NUM>) can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is between <NUM>:<NUM> and <NUM>:<NUM>. As a Lewis acid AlCl<NUM> or FeCl<NUM> or BF<NUM>. Et<NUM>O can be used. The molar ratio between the Lewis acid and the compound of formula (<NUM>) can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably between <NUM>:<NUM> and <NUM>:<NUM>. The molar ratio between compound of Formula (<NUM>) and compound of Formula (<NUM>) can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is <NUM>:<NUM>. Compound of Formula (<NUM>) is dissolved in the solvent, preferably dichloromethane. The concentration of compound of formula (<NUM>) in the solvent can be between <NUM>/g and <NUM>/g. In the preferred embodiment when dichloromethane is used as a solvent, the concentration of the compound of Formula (<NUM>) in dichloromethane can be between <NUM>/g and <NUM>/g, preferably it is between <NUM>/g and <NUM>/g. The mixture is heated to a temperature between <NUM> and <NUM> and <NUM>/<NUM> (molar ratio with respect to total amount of the Lewis acid) of Lewis acid is added and dissolved in the mixture. Then compound of Formula (<NUM>) is added in the course of between <NUM> and <NUM> minutes. Then remaining <NUM>/<NUM> (molar ratio with respect to total amount of the Lewis acid) of the Lewis acid is added to the mixture. The mixture is then stirred at a temperature between <NUM> and <NUM> for between <NUM> and <NUM> minutes. Then the mixture is heated to between <NUM> and <NUM> and the mixture is stirred at this temperature for between <NUM> and <NUM> minutes. The reaction progress can be monitored by any suitable technique, for example HPLC or GC. After the reaction is finished, the reaction mixture is cooled to a temperature between <NUM> and <NUM>. The reaction mixture is added into an acetate such as methyl acetate or ethyl acetate. The reaction mixture is added in several portion, for example in <NUM> or <NUM> or <NUM> or <NUM> or <NUM> or <NUM> portion, preferably it is added dropwise. The mixture is added into water in the course of between <NUM> and <NUM> minutes. The mixture is added in several portion, for example in <NUM> or <NUM> or <NUM> or <NUM> or <NUM> or <NUM> portion, preferably it is added dropwise. The weight ratio between compound of Formula (<NUM>) and the acetate can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is between <NUM>:<NUM> and <NUM>:<NUM>. The weight ratio between the acetate and water can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is between <NUM>:<NUM> and <NUM>:<NUM>. The resulting mixture is mixed with toluene. The weight ratio between toluene and the acetate can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is between <NUM>:<NUM> and <NUM>:<NUM>. The phases are separated and the water phase is extracted twice with toluene. The weight ratio between toluene and the acetate can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is between <NUM>:<NUM> and <NUM>:<NUM>. Combined organic phases are evaporated to between <NUM>% and <NUM>%, preferably to <NUM>% (acetate and a part of toluene are distilled off from the mixture) of the original volume to obtain a suspension. The mixture is cooled to a temperature between (-<NUM>) and <NUM> and stirred at this temperature for between <NUM> and <NUM> minutes. The solid mass is filtered off and optionally washed with toluene and dried.

Obtained solid compound of Formula (<NUM>), Form <NUM>, can be characterized by XRPD pattern having 2θ values <NUM>°, <NUM>°, <NUM>° and <NUM>° degrees <NUM> theta (± <NUM> degrees <NUM> theta). The solid form can be also characterized by XRPD pattern having 2θ values <NUM>°, <NUM>°, <NUM>°, <NUM>°, <NUM>°, <NUM>° and <NUM>° degrees <NUM> theta (± <NUM> degrees <NUM> theta). The solid form can be further characterized by XRPD pattern described in the following table:.

The solid Form <NUM> can be also characterized by XRPD pattern depicted in <FIG>.

The compound of Formula (<NUM>) can be purified by a process comprising:.

The weight ratio between compound of Formula (<NUM>) and toluene can be between <NUM>:<NUM> and <NUM>:<NUM>. Compound of Formula (<NUM>) can be dissolved in toluene at a temperature between <NUM> and <NUM>. The mixture is cooled to between -<NUM> and -<NUM> and stirred at this temperature for between <NUM> and <NUM> hours. Obtained suspension is filtered off and optionally dried to obtain the solid Form <NUM> of compound of Formula (<NUM>) in a yield between <NUM>% and <NUM>%.

The compound of Formula (<NUM>) can be prepared by a process described in the prior art or by a process comprising:.

Contrary to the solvents described in prior art <NUM>-methyl tetrahydrofurane (MeTHF) improves the purity of obtained compound of Formula (<NUM>). The concentration of compound of Formula (<NUM>) in <NUM>-methyl tetrahydrofurane can be between <NUM>/g and <NUM>/g. The molar ratio between the compound of Formula (<NUM>) and dimethylformamide (DMF) can be between <NUM>:<NUM> and <NUM>:<NUM>. The molar ratio between oxalyl chloride or thionyl chloride and the compound of Formula (<NUM>) can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is between <NUM>:<NUM> and <NUM>:<NUM>. Compound of Formula (<NUM>) is dissolved in <NUM>-methyltetrahydrofurane under a protective atmosphere, for example nitrogen or argon. Dimethylformamide is added to the mixture. The mixture is cooled to a temperature between <NUM> and <NUM>. Oxalyl chloride or thionyl chloride is added to the mixture in the course of between <NUM> and <NUM> minutes. The mixture is stirred for between <NUM> and <NUM> minutes. The reaction progress can be monitored by any suitable technique, for example HPLC. After the reaction is finished, the mixture is concentrated at <NUM>-<NUM> and under vacuum (<NUM> mbar). Obtained residue is cooled to room temperature (<NUM>-<NUM>) and contacted with heptane. The concentration of compound of Formula (<NUM>) in heptane can be between <NUM>/g and <NUM>/g, preferably it is between <NUM>/g and <NUM>/g. Resulting mixture is stirred for between <NUM> and <NUM> minutes at <NUM>-<NUM>, filtered and the filtrate is evaporated to provide compound of Formula (<NUM>) in excellent yield and purity.

Compound of Formula (<NUM>) can be transformed into Ibrutinib, compound of Formula (<NUM>), by a process described in the prior art or by a process comprising:.

Ammonia in step i. can be either gaseous ammonia or a solution of ammonia can be used. Preferably water solution of ammonia is used. Water solution of ammonia can be <NUM>% or <NUM>% or <NUM>% solution of ammonia in water, preferably <NUM>% solution is used. The reaction step i. can be optionally performed in a suitable solvent, for example dioxane or toluene, preferably dioxane is used. Use of dioxane improves the processability (filterability) of prepared compound of Formula (<NUM>). The concentration of compound of Formula (<NUM>) in the solvent can be between <NUM>/g and <NUM>/g, preferably it is between <NUM>/g and <NUM>/g. The molar ratio between compound of Formula (<NUM>) and ammonia can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is between <NUM>:<NUM> and <NUM>:<NUM>. Compound of Formula (<NUM>) is dissolved in the solvent. The mixture is heated to a temperature between <NUM> and <NUM> and ammonia is added. The mixture is stirred for between <NUM> and <NUM> hours. The reaction progress can be monitored by any suitable technique, for example HPLC. After the reaction is finished, the reaction mixture is heated to a temperature between <NUM> and <NUM> and to the mixture hydrazine is added. Hydrazine can be in a form of a salt, for example hydrazine hydrochloride or in a form of a hydrate. Hydrazine hydrate is preferably used. Hydrazine can be added as a solid or can be used in a solution in a suitable solvent. The reaction mixture is stirred for between <NUM> and <NUM> hours. The reaction progress can be monitored by any suitable technique, for example HPLC. After the reaction is finished, to the mixture water is added at an elevated (<NUM> - <NUM>) temperature. The ratio (wt:wt, weight : weight) between water and the solvent used in step i. can be between <NUM>:<NUM> and <NUM>:<NUM>. The mixture is then cooled to a temperature between <NUM> and <NUM>. Obtained solid is filtered off and optionally washed with ethyl acetate and water and dried. Stirring of obtained compound of Formula (<NUM>) in a mixture of dioxane and water (weight ratio <NUM>:<NUM>) to improve purity of obtained compound of formula (<NUM>) (weight ratio compound of Formula (<NUM>):dioxane:water was <NUM>:<NUM>:<NUM>) can be used.

Compound of Formula (<NUM>) can be transformed into Ibrutinib, compound of Formula (<NUM>) by a process described in the prior art or by a process comprising.

The step i. is performed in a presence of triphenylphospine and an azodicarboxylate such as diisopropyl azodicarboxylate or diethyl azodicarboxylate or di-tert-butyl azodicarboxylate or dibenzyl azodicarboxylate. The reaction is performed in a suitable solvent such as <NUM>-methyl tetrahydrofurane or tetrahydrofurane or toluene or dimethylformamide, preferably <NUM>-methyltetrahydrofurane (MeTHF) is used. The molar ratio between compound of Formula (<NUM>) and triphenylphosphine can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is between <NUM>:<NUM> and <NUM>:<NUM>. The molar ratio between compound of Formula (<NUM>) and the azodicarboxylate, preferably diisopropyl azodicarboxylate can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is between <NUM>:<NUM> and <NUM>:<NUM>. The molar ratio between compound of Formula (<NUM>) and compound of Formula (<NUM>) can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is between <NUM>:<NUM> and <NUM>:<NUM>. Compound of Formula (<NUM>), triphenylphosphine and compound of Formula (<NUM>) are mixed with the solvent. The concentration of compound of Formula (<NUM>) in the solvent can be between <NUM>/g and <NUM>/g, preferably it is between <NUM> and <NUM>/g. The mixture is heated to a temperature between <NUM> and <NUM> and the azodicarboxylate, preferably diisopropyl azodicarboxylate in a suitable solvent is added. The solvent can be the same solvent as was used for dissolving compound of Formula (<NUM>) or it can be different. Preferably it is <NUM>-methyl tetrahydrofurane. The concentration of the azodicarboxylate, preferably diisopropyl azodicarboxylate in the solvent can be between <NUM>/g and <NUM>/g, preferably it is between <NUM>/g and <NUM>/g. The azodicarboxylate, preferably diisopropyl azodicarboxylate is preferably added in the course of between <NUM> and <NUM> minutes. The mixture can be then stirred for between <NUM> and <NUM> minutes. The reaction progress can be monitored by any suitable technique, for example HPLC. After the reaction is finished, compound of Formula (<NUM>) is deprotected by a suitable process, for example using an acid (for examle HCl or other strong acid such as trifluoroacetic acid) or hydrogenation deprotection using hydrogen in a presence of a suitable catalyst. Deprotection using HCl, more preferably aqueous solution of HCl, is preferably used. The aqueous solution is preferably concentrated HCl (<NUM>-<NUM>%) water solution. The molar ratio between the acid and the compound of Formula (<NUM>) can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is between <NUM>:<NUM> and <NUM>:<NUM>. The deprotection step can be performed at an elevated temperature, for example between <NUM> and <NUM>. The acid is added to the mixture prepared in the previous step and the mixture is stirred for between <NUM> and <NUM> minutes. The reaction progress can be monitored by any suitable technique, for example HPLC. After the reaction is finished, layers are separated. In comparison with processes described in the prior art, using the described process comprising reaction step i. in <NUM>-methyl tetrahydrofurane and subsequent deprotection using aqueous solution of HCl improves the purity of obtained compound of Formula (<NUM>) with respect to reaction side-products mostly originated from triphenylphosphine or the azodicarboxylate. The side products remain in organic phase, compound of Formula (<NUM>) in form of a salt, preferably HCl salt, remains in water phase and is separated from the impurities during phases separation.

The water layer is heated to between <NUM> and <NUM>. To the water layer <NUM>-propanol is added. The weight ratio between <NUM>-propanol and the compound of Formula (<NUM>) can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is between <NUM>:<NUM> and <NUM>:<NUM>. The mixture is then stirred for between <NUM> and <NUM> minutes. The mixture is then cooled to between <NUM> and <NUM> and stirred at this temperature for between <NUM> and <NUM> hours. Obtained solid compound of Formula (<NUM>) or a salt thereof is filtered off, optionally washed with <NUM>-propanol and dried.

In case that compound of Formula (<NUM>) is obtained in a form of a salt it can be transformed into free form of compound of Formula (<NUM>) by contacting with a base, preferably in a mixture of water and <NUM>-propanol. The molar ratio between the salt of compound of Formula (<NUM>) and the base can be between <NUM>:<NUM> and <NUM>:<NUM>. The salt of compound of Formula (<NUM>) is dissolved in water. The concentration of the salt of compound of Formula (<NUM>) in water can be between <NUM>/g and <NUM>/g, preferably it is between <NUM>/g and <NUM>/g. The mixture is heated to a temperature between <NUM> and <NUM>. To the mixture <NUM>-propanol is added. The weight ratio between water and <NUM>-propanol can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is between <NUM>:<NUM> and <NUM>:<NUM>. To the mixture a base, preferably in a form of water solution is added. The base is preferably a hydroxide (such as sodium hydroxide or potassium hydroxide). The concentration of the base in water can be between <NUM> and <NUM>/g, preferably it is between <NUM> and <NUM>/g. The base is preferably added in the course of between <NUM> and <NUM> minutes. Obtained mixture is then stirred for between <NUM> and <NUM> minutes and then cooled to between <NUM> and <NUM>. Solid compound of Formula (<NUM>) is filtered off, optionally washed with water and dried.

Disclosed process comprising preparation of a salt of compound of Formula (<NUM>) by contacting compound of Formula (<NUM>) with an acid and subsequent transformation to the compound of Formula (<NUM>) using a base can be used for further purification of compound of Formula (<NUM>).

Compound of Formula (<NUM>) can be transferred into Ibrutinib, compound of Formula (<NUM>) by a process disclosed in the prior art using acrylic acid or acrylloyl chloride or <NUM>-chloropropionyl chloride or by a process comprising:.

The molar ratio between compound of Formula (<NUM>) and acryloyl chloride can be between <NUM>:<NUM> and <NUM>:<NUM>. The reaction is performed in a presence of a base for example an amine (such as diethylamine or diisopropylethylamine or triethylamine or <NUM>,<NUM>-diazabicyklo(<NUM>. <NUM>)undec-<NUM>-en (DBU)). The molar ratio between the base and the compound of Formula (<NUM>) can be between <NUM>:<NUM> and <NUM>:<NUM>. Compound of Formula (<NUM>) is dissolved in <NUM>-methyl tetrahydrofurane (MeTHF) and the base is added. The concentration of compound of Formula (<NUM>) in <NUM>-methyl tetrahydrofurane can be between <NUM>/g and <NUM>/g, preferably it is between <NUM>/g and <NUM>/g. The mixture is cooled to (-<NUM>)°C-(-<NUM>). Acryloyl chloride is added to the mixture in the course of between <NUM> and <NUM> minutes. Acryloyl chloride is preferably used in a form of a solution in a suitable solvent, preferably in <NUM>-methyl tetrahydrofurane. The concentration of acryloyl chloride in the solvent can be between <NUM>/g and <NUM>/g. The mixture was then stirred for between <NUM> and <NUM> minutes. The reaction progress can be monitored by any suitable technique, for example HPLC. After the reaction is finished, the mixture is heated to between <NUM> and <NUM> Solid mass is filtered off and washed with the suitable solvent. To the filtrate an acid for example HCl, preferably <NUM>% water solution of HCl is added. The weight ratio between the added acid and the compound of Formula (<NUM>) can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is between <NUM>:<NUM> and <NUM>:<NUM>. The mixture can be optionally heated to a temperature between <NUM> and <NUM> and active carbon is added. The ratio (wt:wt) between compound of Formula (<NUM>) and the active carbon can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is <NUM>:<NUM>. The mixture is then stirred for between <NUM> and <NUM> minutes and filtered off. The filtrate is then concentrated to provide Ibrutinib, compound of Formula (<NUM>). Using the described procedure improves the purity of obtained Ibrutinib in comparison with procedures disclosed in the prior art. Obtained Ibrutinib can be transformed into a solvate form, such as toluene solvate or other solvates disclosed in the prior art or by the process described in Example <NUM> or by the process described later. Ibrutinib can also be transformed into polymorphic forms C or A or other polymorphic forms disclosed in the prior art (for example in <CIT>) or by a process disclosed in Example <NUM> or <NUM> or by the processes described later. Ibrutinib can be transformed into polymorphic form C (disclosed in <CIT>) by a process comprising:.

The volume ratio <NUM>-methyl tetrahydrofurane: methanol can be between <NUM>:<NUM> and <NUM>:<NUM>. The concentration of Ibrutinib in the mixture can be between <NUM>/g and <NUM>/g. Ibrutinib is contacted with the mixture <NUM>-methyl tetrahydrofurane:methanol and the mixture is heated to between <NUM> and <NUM> to obtain a solution. The solution is cooled to a temperature between <NUM> and <NUM> and stirred at this temperature for between <NUM> and <NUM> hours. The obtained suspension was cooled to a temperature between <NUM> and <NUM> and stirred at this temperature for between <NUM> and <NUM> hours. Obtained solid is filtered off, washed with methanol and dried to provide Ibrutinib in crystalline Form C (disclosed in <CIT>).

Ibrutinib, preferably in crystalline form C, can be contacted with methyl tert-butyl ether (MTBE) to provide Ibrutinib crystalline form A (disclosed in <CIT>). Concentration of Ibrutinib in methyl tert-butyl ether can be between <NUM>/g and <NUM>/g. Ibrutinib is mixed with methyl tert-butyl ether, the mixture is stirred at a temperature between <NUM> and <NUM> for between <NUM> and <NUM> hours. The mixture is then cooled to a temperature between <NUM> and <NUM> and filtered off. Obtained solid can be washed with methyl tert-butyl ether and dried to provide Ibrutinib in crystalline form A.

Ibrutinib can be also transformed into a toluene solvate by a process comprising:.

The volume ratio <NUM>-methyl tetrahydrofurane:toluene can be between <NUM>:<NUM> and <NUM>:<NUM>, preferably it is <NUM>:<NUM>. Concentration of Ibrutinib in the mixture can be between <NUM>/g and <NUM>/g, preferably it is between <NUM>/g and <NUM>/g. Ibrutinib is dissolved in the mixture at a temperature between <NUM> and <NUM>. The solution is cooled to a temperature between <NUM> and <NUM> and stirred at this temperature for between <NUM> and <NUM> minutes. Obtained solid is filtered off and washed with toluene to provide toluene solvate of Ibrutinib.

The invention will be further described with reference to the following examples.

XRPD spectrum was obtained using the following measurement conditions:
Panalytical Empyrean diffractometer with Θ/2Θ geometry (transmition mode), equipped with a PixCell 3D detector;.

<NUM> of <NUM>,<NUM>-dichloropyrimidine-<NUM>-carboxylic acid (compound of Formula (<NUM>)) was dissolved in <NUM> of <NUM>-methyl tetrahydrofurane (MeTHF) under nitrogen atmosphere and <NUM> of dimethylformamide (DMF) was added. The mixture was cooled to <NUM>° C and <NUM> of oxalyl chloride was added dropwise in the course of <NUM> minutes. The mixture was stirred for <NUM> minutes. The mixture was evaporated (<NUM> mbar, <NUM> - <NUM>° C). Obtained residue was cooled to <NUM> - <NUM>° C and to the mixture <NUM> of n-heptane is added. Obtained mixture was stirred for <NUM> minutes at <NUM> - <NUM>. The mixture was then filtered, washed with <NUM> of n-heptane. The mixture was evaporated (<NUM> mbar, <NUM> - <NUM>° C) to provide <NUM> of compound of Formula (<NUM>) as oily liquid in <NUM>% yield and <NUM>% purity (HPLC IN).

Obtained compound of Formula (<NUM>) was dissolved in <NUM> of dichloromethane. To the mixture <NUM> of AlCl<NUM> was added in two parts (2x36 g). The mixture was heated to <NUM> - <NUM> to form a solution. <NUM> of diphenylether (compound of Formula (<NUM>)) was added in the course of <NUM> minutes at <NUM> - <NUM>° C. To the mixture <NUM> of AlCl<NUM> was added. The mixture was stirred at <NUM> - <NUM>° C for <NUM> minutes and then for <NUM> at <NUM> - <NUM>° C. The mixture was cooled to <NUM>. The mixture was dropped into <NUM> of ethyl acetate. The mixture was then dropped into <NUM> of water in the course of <NUM> minutes. Obtained suspension was extracted with <NUM> of toluene at <NUM>, layers were separated and the water phase was extracted two times with <NUM> of toluene at <NUM>° C. The combined organic solutions were evaporated to final weight <NUM> and the mixture was cooled to <NUM> - (-<NUM>° C) in the course of <NUM> minutes. The solid was filtered off at <NUM> - (-<NUM>° C), washed with 2x25 g of cooled (<NUM>) toluene and vacuum dried (<NUM> mbar, <NUM>° C, <NUM> hours) to provide <NUM> (yield <NUM>%, purity <NUM>% (HPLC IN)) of compound of Formula (<NUM>). XRPD pattern of obtained solid corresponds to XRPD pattern depicted in <FIG>.

<NUM> of compound of Formula (<NUM>) was dissolved in <NUM> of dioxane and the mixture was heated to <NUM> - <NUM>° C. To the mixture <NUM> of aqueous ammonia (<NUM>% solution) was added in the course of <NUM> minutes. The mixture was stirred for <NUM> hour. The mixture was heated to <NUM>° C and <NUM> of Hydrazine hydrate was added. The mixture was stirred for <NUM> minutes. To the mixture <NUM> of water was added in the course of <NUM> hour at <NUM>° C. The mixture was cooled to <NUM> - <NUM>° C in the course of <NUM> hours. The solid mass was filtered off at <NUM> - <NUM>° C, washed with <NUM> of ethyl acetate, <NUM> of water and <NUM> of ethyl acetate and vacuum dried (<NUM> mbar, <NUM>, 3hours) to provide <NUM> of compound of Formula (<NUM>) (yield <NUM>%, purity <NUM>%, (HPLC IN)).

<NUM> of compound of Formula (<NUM>) were mixed with <NUM> of Triphenylphosphine, <NUM> of compound of Formula (<NUM>) and <NUM> of <NUM>-methyl tetrahydrofurane (MeTHF). The mixture was heated to <NUM>° C. <NUM> of Diisopropyl azodicarboxylate (DIAD) in <NUM> of MeTHF was added in the course of <NUM> minutes and solution was stirred for next <NUM> minutes.

The mixture was heated to <NUM>° C and <NUM> of concentrated (<NUM>-<NUM>%) Hydrochloric acid water solution was added. The mixture was stirred for <NUM> minutes. The layers were separated at (<NUM> - <NUM>° C) and water layer was mixed with <NUM> of <NUM>-propanol at <NUM>° C. <NUM>-propanol was added in the course of <NUM> minutes. The suspension was cooled to <NUM> - <NUM> ° C in the course of <NUM> hours. The solid mass was filtered off at <NUM> - <NUM>° C, washed with <NUM> of cooled (<NUM>) <NUM>-propanol to provide <NUM> of compound of Formula (<NUM>) in a form of <NUM>. HCl (dihydrochloride) salt.

Obtained solid compound of Formula (<NUM>). 2HCl was mixed with <NUM> of water. The mixture was heated to <NUM>° C. To the mixture <NUM> of <NUM>-propanol was added. To the mixture <NUM> of sodium hydroxide in <NUM> of water was added in the course of <NUM> minutes. The suspension was stirred at <NUM>° C for next <NUM> minutes. The suspension was cooled to <NUM> - <NUM>° C in the course of <NUM> hour. The solid mass was filtered off at <NUM> - <NUM>° C, washed with <NUM> of water and vacuum dried (<NUM> mbar, <NUM>° C, 5hours) to provide <NUM> of compound of formula (<NUM>) (yield <NUM>%, purity <NUM>% (HPLC IN)).

Under nitrogen protection, <NUM> of compound of Formula (<NUM>) was mixed with <NUM> of <NUM>-methyl tetrahydrofurane (MeTHF) and <NUM> of diisopropyl ethylamine (DIPEA). The suspension was cooled down to (-<NUM>)-(-<NUM>) °C and a solution of <NUM> of acryloyl chloride in <NUM> of MeTHF was slowly added dropwise (in the course of <NUM> hour). The suspension was stirred at -<NUM> next <NUM> minutes. The mixture was filtered at <NUM> - <NUM>° C and the filter cake was washed with 2x5g of MeTHF.

The filtrate was mixed with <NUM> of HCl (<NUM>-<NUM>%) at <NUM>° C. The mixture was heated to <NUM>° C and mixed with <NUM> of active carbon. The mixture was heated to <NUM> and stirred for <NUM> hour. The mixture was filtered at <NUM>. The filtrate was concentrated under low pressure (40kPa, <NUM> - <NUM>° C, <NUM>. 5hr) to provide <NUM> of solid mass in a form of a foam.

The solid was mixed with a mixture of <NUM> of MeTHF and <NUM> of methanol and the mixture was heated to <NUM>° C to obtain a solution. The solution was cooled to <NUM>° C in the course of <NUM> hour. The mixture was stirred at <NUM>° C for <NUM> hours. Obtained suspension was cooled to <NUM> - <NUM>° C and stirred for next <NUM> hours. Obtained solid mass was filtered off, washed with 2x5g of cold (<NUM>) methanol and dried on filter for <NUM> hour and then at <NUM>-<NUM> for <NUM> hour to provide <NUM> of compound of Formula (<NUM>). (yield <NUM>%, purity <NUM>% (HPLC IN)).

<NUM> of compound of Formula (<NUM>) were suspended in <NUM> of methyl tert-butyl ether (MTBE) under nitrogen atmosphere and the suspension was stirred at <NUM>° C for <NUM> hours. The suspension was cooled to room temperature (<NUM>-<NUM>). Obtained solid was filtered off, washed with 2x2g of MTBE and dried on filter for <NUM> hour to provide <NUM> (yield <NUM>%) of compound of formula (<NUM>) in polymorphic form A.

Under nitrogen protection, <NUM> of compound of Formula (<NUM>) was mixed with <NUM> of <NUM>-methyl tetrahydrofurane (MeTHF) and <NUM> of diisopropyl ethylamine (DIPEA). The suspension was cooled down to (-<NUM>)-(-<NUM>) °C and a solution of <NUM> of acryloyl chloride in <NUM> of MeTHF was slowly added dropwise (in the course of <NUM> hour). The suspension was stirred at -<NUM> next <NUM> minutes. The mixture was filtered at <NUM> - <NUM>° C and the filter cake was washed with 2x5g of MeTHF.

The filtrate was combined with <NUM> of HCl (<NUM>-<NUM>%) at <NUM>° C. The mixture was heated to <NUM>° C and combined with <NUM> of active carbon. The mixture was heated to <NUM>° C and stirred for <NUM> hour. The mixture was filtered at <NUM>° C. The filtrate was concentrated under low pressure (40kPa, bath <NUM> - <NUM>° C, <NUM>. 5hr) to provide <NUM> of solid mass in a form of a foam.

The solid was dissolved in a mixture of MeTHF/toluene (<NUM>:<NUM>:<NUM>, solid:MeTHF:toluene, wt:wt:wt) at <NUM> - <NUM>° C. The solution was filtered and cooled to <NUM> - <NUM> to form suspension. The solid mass was filtered off, washed with toluene and dried to provide <NUM> (yield <NUM>%) of toluene solvate of compound of Formula (<NUM>).

Claim 1:
A process for preparation of Ibrutinib, compound of Formula <NUM>, or a salt thereof,
<CHM>
the process comprising:
a. Reacting compound of formula (<NUM>) with compound of formula (<NUM>) in a presence of Lewis acid to provide compound of Formula (<NUM>),
<CHM>
b. Contacting compound of Formula (<NUM>) with toluene;
c. Isolate a solid form of compound of formula (<NUM>) from toluene;
d. Transforming compound of Formula (<NUM>) into Ibrutinib.